Forbid setting hints for multi-line text controls.
This doesn't work anyhow, so make it explicit by asserting if an attempt to do it is made. And document this. Also add a test of SetHint() to the text sample to verify it still works. Closes #14456. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1139,6 +1139,18 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
|
||||
return handled;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Other miscellaneous stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool wxTextCtrlBase::SetHint(const wxString& hint)
|
||||
{
|
||||
wxCHECK_MSG( IsSingleLine(), false,
|
||||
wxS("Hints can only be set for single line text controls") );
|
||||
|
||||
return wxTextEntry::SetHint(hint);
|
||||
}
|
||||
|
||||
// do the window-specific processing after processing the update event
|
||||
void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
|
Reference in New Issue
Block a user