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:
parent
761bdfaaa9
commit
c5172ed1bf
@ -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;
|
||||
};
|
||||
|
@ -71,3 +71,8 @@ bool wxControl::ProcessCommand(wxCommandEvent& event)
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
void wxControl::CocoaSetEnabled(bool enable)
|
||||
{
|
||||
[GetNSControl() setEnabled: enable];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user