lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [lmi] Overriding wx member functions


From: Vadim Zeitlin
Subject: Re[2]: [lmi] Overriding wx member functions
Date: Thu, 1 Dec 2005 16:47:30 +0100

On Tue, 29 Nov 2005 19:50:12 +0000 Greg Chicares <address@hidden> wrote:

GC> No, it didn't help. I looked into it and here's what I found.
GC> 
GC> The 'Face' tab is selected (using the keyboard).
GC> 
GC> Its first control receives focus (as reported by diagnostic code I
GC> temporarily added to the EVT_CHILD_FOCUS handler).
GC> 
GC> Then the EVT_UPDATE_UI handler is called. One of its effects is to
GC> disable the focused control.

 I'm afraid that I can't really say what happens to the focus when you
disable the control having it currently. IMHO this shouldn't be done if
possible.

GC> At this point, temporary diagnostic
GC> code in the EVT_UPDATE_UI handler reports that
GC>   0 == FindFocus()
GC> is true.
GC> 
GC> In your opinion should wx prevent this condition?

 Yes, I guess it should but I think it would be better to avoid this
situation entirely.

GC> Is there an easy way to distinguish controls that would normally
GC> accept input from things like groupboxes?

 Yes: wxWindow::AcceptsFocus() should be what you need. But I think the
simplest would be to just call CurrentPage()->SetFocus(): wx will then
find the first control accepting focus itself.

 Regards,
VZ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]