Override CocoaSetEnabled() to call -[NSControl setEnabled:]

Do NOT forget to override this in subclasses which use a Cocoa view
not derived from NSControl.  Crashes will result.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2003-08-19 14:49:28 +00:00
parent 761bdfaaa9
commit c5172ed1bf
2 changed files with 7 additions and 0 deletions

View File

@ -59,6 +59,8 @@ public:
// Calls the callback and appropriate event handlers
bool ProcessCommand(wxCommandEvent& event);
// Enables the control
virtual void CocoaSetEnabled(bool enable);
protected:
virtual wxSize DoGetBestSize() const;
};

View File

@ -71,3 +71,8 @@ bool wxControl::ProcessCommand(wxCommandEvent& event)
return GetEventHandler()->ProcessEvent(event);
}
void wxControl::CocoaSetEnabled(bool enable)
{
[GetNSControl() setEnabled: enable];
}