On 23/05/2012 1:13 AM, Armel wrote:
>
> Le mardi 22 mai 2012 18:15:54 UTC+2, Dave a �crit :
>
> Just as an FYI - I just discovered that relying on kill focus events
> on OSX is not a good thing. On Windows, my edit control always gets
> a kill event when you click on a button. Not so on OSX. Watching the
> window closely, it was evident why - clicking on a button does not
> set focus there, hence the edit control never loses focus. Quite an
> eye-opener to a hard-core windows dude... (luckily, I should be able
> to easily refactor and key off text-change events instead)
I found the same thing with dialogs and stdbuttonsizer and had to
explicitly set focus to the button in an onclick handler to remove focus
from whatever control had focus.
> my case is a bit different, I use the kill focus event to simply put
> back some "user friendly" value in the text field when the user did not
> actually edited it (i.e. on_set_focus puts an "editable" version of the
> text).
> nonetheless the events don't really works :(
> Regards
> Armel
I gave up on wxComboBox for my autocomplete and add user new values for
similar reasons and used a wxListCtrl/wxComboCtrl combination which does
work.
The zoom wxComboBox in the wxPrintPreview frame doesn't work in
OSX-Cocoa as another example.
Regards, John