WxButton is still selected after next button is selected

The panel has several wxButtons. wxButton blinks when focused, but after a new button is selected, the previous one does not stop blinking. Only two of them look selected, for example. if the third is selected, the first looks good, etc.

I tried to stop the propagation of SetFocus events, subclass wxButton and override the methods

bool AcceptsFocusFromKeyboard() const { 
    return false;
}


virtual bool AcceptsFocus() const {
    return false;
}

      

but no results.

This only happens on Windows 7, Win 8.1 and Mac looks as expected.

Has anyone had the same problem?

+3


source to share


1 answer


You don't need to do anything special for focus to work properly, just make sure you don't catch or miss any focus events, as this can really break things like the docs mentioned .



If you can reproduce the problem with simple changes to one of the wxWidgets samples using wxWidgets 3, open a ticket explaining how.

0


source







All Articles