reorder GetLabel(), GetLabelText(), SetLabel() and SetLabelText() function declarations, implementations and relative documentations.
Add wxStaticTextBase::GetLabelWithoutMarkup() and use it in the wxMSW implementation of wxStaticText::SetLabel() to close bug #11446; the function RemoveMarkup() which was previously used in fact could not check for presence/absence of wxST_MARKUP style since it's a static function. Add wxStaticTextBase::SetLabelText() functions for symmetry with wxControlBase::SetLabelText() Add test unit for both wxControl::*Label* and wxStaticText::*Label* functions. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,13 +88,6 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
|
||||
return true;
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxString wxControlBase::GetLabelText(const wxString& label)
|
||||
{
|
||||
// we don't want strip the TABs here, just the mnemonics
|
||||
return wxStripMenuCodes(label, wxStrip_Mnemonics);
|
||||
}
|
||||
|
||||
void wxControlBase::Command(wxCommandEvent& event)
|
||||
{
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
@@ -154,9 +147,17 @@ void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
#endif // wxUSE_RADIOBTN
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxString wxControlBase::GetLabelText(const wxString& label)
|
||||
{
|
||||
// we don't want strip the TABs here, just the mnemonics
|
||||
return wxStripMenuCodes(label, wxStrip_Mnemonics);
|
||||
}
|
||||
|
||||
/* static */
|
||||
wxString wxControlBase::RemoveMnemonics(const wxString& str)
|
||||
{
|
||||
// we don't want strip the TABs here, just the mnemonics
|
||||
return wxStripMenuCodes(str, wxStrip_Mnemonics);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user