X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/768d9ec8ca53f44275a6250c44bb69bfc2840e8c..42c37decc53971441199dfe4d8adf7fb842b2336:/src/cocoa/spinbutt.mm diff --git a/src/cocoa/spinbutt.mm b/src/cocoa/spinbutt.mm index 26e6ae1441..60d3cd59ef 100644 --- a/src/cocoa/spinbutt.mm +++ b/src/cocoa/spinbutt.mm @@ -17,6 +17,8 @@ #import +IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) + IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) BEGIN_EVENT_TABLE(wxSpinButton, wxSpinButtonBase) END_EVENT_TABLE() @@ -28,10 +30,12 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID winid, { if(!CreateControl(parent,winid,pos,size,style,wxDefaultValidator,name)) return false; - SetNSControl([[NSStepper alloc] initWithFrame: NSMakeRect(10,10,20,20)]); + SetNSControl([[NSStepper alloc] initWithFrame: MakeDefaultNSRect(size)]); [m_cocoaNSView release]; if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; }