git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8474
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// descend into all subwindows
#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
-// Don't automatically set the focus when left-clicking on the window
-#define wxWS_EX_NO_AUTOFOCUS 0x10000000
-
/*
* wxFrame/wxDialog style flags
*/
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
virtual void DoToolbarUpdates();
+ // Don't want toolbars to accept the focus
+ bool AcceptsFocus() const { return FALSE; }
+
protected:
// to implement in derived classes
// -------------------------------
long style,
const wxString& name)
{
- // Don't want to grab the focus when we left click
- SetExtraStyle(GetExtraStyle() | wxWS_EX_NO_AUTOFOCUS);
-
// common initialisation
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
return FALSE;
case WM_LBUTTONDOWN:
// set focus to this window
- if ((GetExtraStyle() & wxWS_EX_NO_AUTOFOCUS) != wxWS_EX_NO_AUTOFOCUS)
+ if (AcceptsFocus())
SetFocus();
// fall through