it is not possible to show/hide the window from the UpdateUI event handler; refactored the code by moving control-specific parts into the derived classes (patch 1338350)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -471,9 +471,12 @@ wxString wxTextCtrlBase::GetRange(long from, long to) const
|
||||
// do the window-specific processing after processing the update event
|
||||
void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
if ( event.GetSetEnabled() )
|
||||
Enable(event.GetEnabled());
|
||||
// call inherited, but skip the wxControl's version, and call directly the
|
||||
// wxWindow's one instead, because the only reason why we are overriding this
|
||||
// function is that we want to use SetValue() instead of wxControl::SetLabel()
|
||||
wxWindowBase::DoUpdateWindowUI(event);
|
||||
|
||||
// update text
|
||||
if ( event.GetSetText() )
|
||||
{
|
||||
if ( event.GetText() != GetValue() )
|
||||
|
Reference in New Issue
Block a user