Make wxMac wxSpinCtrl emit killfocus events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -288,6 +288,8 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
||||
#endif
|
||||
|
||||
wxLogTrace(_T("Focus"), _T("focus lost(%p)"), wx_static_cast(void*, thisWindow));
|
||||
|
||||
wxPrintf( "Focus lost %s\n", thisWindow->GetClassInfo()->GetClassName() );
|
||||
|
||||
// remove this as soon as posting the synthesized event works properly
|
||||
static bool inKillFocusEvent = false ;
|
||||
|
@@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
void OnKillFocus(wxFocusEvent& WXUNUSED(event))
|
||||
void OnKillFocus(wxFocusEvent& event)
|
||||
{
|
||||
long l;
|
||||
if ( !GetValue().ToLong(&l) )
|
||||
@@ -88,13 +88,16 @@ protected:
|
||||
m_spin->m_btn->SetValue( l );
|
||||
|
||||
// if not
|
||||
wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, m_spin->GetId());
|
||||
event.SetEventObject(m_spin);
|
||||
event.SetInt(l);
|
||||
m_spin->HandleWindowEvent(event);
|
||||
wxCommandEvent cevent(wxEVT_COMMAND_SPINCTRL_UPDATED, m_spin->GetId());
|
||||
cevent.SetEventObject(m_spin);
|
||||
cevent.SetInt(l);
|
||||
m_spin->HandleWindowEvent(cevent);
|
||||
|
||||
m_spin->m_oldValue = l;
|
||||
}
|
||||
|
||||
event.SetEventObject( GetParent() );
|
||||
GetParent()->HandleWindowEvent(event);
|
||||
}
|
||||
|
||||
void OnTextChange(wxCommandEvent& event)
|
||||
|
Reference in New Issue
Block a user