The default colours for this control are wxTextCtrl-like and not wxButton-like
(which is the default). Override GetDefaultAttributes() to indicate this and
to avoid returning a wrong background from wxControl::DoMSWControlColor() when
just a foreground is set.
See #1691.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61858
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// wxSpinButton doesn't accept focus, but we do
virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); }
+ // we're like wxTextCtrl and not (default) wxButton
+ virtual wxVisualAttributes GetDefaultAttributes() const
+ {
+ return GetClassDefaultAttributes(GetWindowVariant());
+ }
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
+ {
+ return GetCompositeControlsDefaultAttributes(variant);
+ }
+
// for internal use only
// get the subclassed window proc of the buddy text