Use generic spin control itself as parent for its children.
This fixes a problem with using wxSpinCtrlGeneric in toolbars under wxOSX, using the toolbar itself (i.e. the parent of the spin control) as parent for the children didn't work there and no windows were visible at all. Also use wxNavigationEnabled as base class of wxSpinCtrlGeneric to fix keyboard navigation. And override SetBackgroundColour() to set it for the text control part of the spin control only. Closes #15016. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,7 +43,7 @@ class wxSpinCtrlTextGeneric; // wxTextCtrl used for the wxSpinCtrlGenericBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase
|
||||
: public wxCompositeWindow<wxSpinCtrlBase>
|
||||
: public wxNavigationEnabled<wxCompositeWindow<wxSpinCtrlBase> >
|
||||
{
|
||||
public:
|
||||
wxSpinCtrlGenericBase() { Init(); }
|
||||
@@ -88,6 +88,8 @@ public:
|
||||
virtual void DoSetToolTip(wxToolTip *tip);
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
virtual bool SetBackgroundColour(const wxColour& colour);
|
||||
|
||||
// get the subcontrols
|
||||
wxTextCtrl *GetText() const { return m_textCtrl; }
|
||||
wxSpinButton *GetSpinButton() const { return m_spinButton; }
|
||||
|
Reference in New Issue
Block a user