Fix explicitly setting focus to generic wxSpinCtrl.
The control itself can't accept focus as its window is disabled so set the focus to its text part instead if SetFocus() is explicitly called. Closes #12259. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -93,8 +93,10 @@ public:
|
||||
void OnTextChar(wxKeyEvent& event);
|
||||
|
||||
// this window itself is used only as a container for its sub windows so it
|
||||
// shouldn't accept the focus at all
|
||||
// shouldn't accept the focus at all and any attempts to explicitly set
|
||||
// focus to it should give focus to its text constol part
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
virtual void SetFocus() { if ( m_textCtrl ) m_textCtrl->SetFocus(); }
|
||||
|
||||
friend class wxSpinCtrlTextGeneric;
|
||||
|
||||
|
Reference in New Issue
Block a user