Allow changing alignment styles after wxTextCtrl creation (wxOSX)
Update NSTextView/NSTextField alignment mode when wxTextCtrl alignment styles are changed with SetWindowStyleFlag(). Closes #17952.
This commit is contained in:
committed by
Artur Wieczorek
parent
cd1c3fab0c
commit
ccc513bca9
@@ -482,6 +482,17 @@ void wxTextCtrl::Command(wxCommandEvent & event)
|
||||
ProcessCommand(event);
|
||||
}
|
||||
|
||||
void wxTextCtrl::SetWindowStyleFlag(long style)
|
||||
{
|
||||
long styleOld = GetWindowStyleFlag();
|
||||
|
||||
wxTextCtrlBase::SetWindowStyleFlag(style);
|
||||
|
||||
static const long flagsAlign = wxTE_LEFT | wxTE_CENTRE | wxTE_RIGHT;
|
||||
if ( (style & flagsAlign) != (styleOld & flagsAlign) )
|
||||
GetTextPeer()->SetJustification();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// standard handlers for standard edit menu events
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -774,4 +785,7 @@ int wxTextWidgetImpl::GetLineLength(long lineNo) const
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
void wxTextWidgetImpl::SetJustification()
|
||||
{
|
||||
}
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
Reference in New Issue
Block a user