Respect border styles for text part of generic wxSpinCtrlDouble
Specifying e.g. wxBORDER_NONE for wxSpinCtrlDouble should work, i.e. remove the border from the wxTextCtrl used by it internally in the generic version, so add wxBORDER_MASK to the list of styles respected by this wxTextCtrl. Closes https://github.com/wxWidgets/wxWidgets/pull/1864
This commit is contained in:
@@ -66,11 +66,13 @@ class wxSpinCtrlTextGeneric : public wxTextCtrl
|
|||||||
public:
|
public:
|
||||||
wxSpinCtrlTextGeneric(wxSpinCtrlGenericBase *spin, const wxString& value, long style=0)
|
wxSpinCtrlTextGeneric(wxSpinCtrlGenericBase *spin, const wxString& value, long style=0)
|
||||||
: wxTextCtrl(spin, wxID_ANY, value, wxDefaultPosition, wxDefaultSize,
|
: wxTextCtrl(spin, wxID_ANY, value, wxDefaultPosition, wxDefaultSize,
|
||||||
// This is tricky: we want to honour any alignment flags
|
// This is tricky: we want to honour all alignment flags
|
||||||
// but not wxALIGN_CENTER_VERTICAL because it's the same
|
// except wxALIGN_CENTER_VERTICAL because it's the same
|
||||||
// as wxTE_PASSWORD and we definitely don't want to show
|
// as wxTE_PASSWORD and we definitely don't want to show
|
||||||
// asterisks in spin control.
|
// asterisks in spin control. We also want to respect
|
||||||
style & (wxALIGN_MASK | wxTE_PROCESS_ENTER) & ~wxTE_PASSWORD)
|
// wxTE_PROCESS and the border flags as well.
|
||||||
|
style & (wxALIGN_MASK | wxBORDER_MASK | wxTE_PROCESS_ENTER)
|
||||||
|
& ~wxTE_PASSWORD)
|
||||||
{
|
{
|
||||||
m_spin = spin;
|
m_spin = spin;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user