]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/slider.mm
Keep order of nodes when wxHashMap is resized; this ensures
[wxWidgets.git] / src / cocoa / slider.mm
index f239be10036bf5aadbd7005d7d05eb6e7a0ef64b..f2fdeb9a83cb5e15e9261b6e6612f34e38e19379 100644 (file)
@@ -9,6 +9,9 @@
 // Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+#include "wx/setup.h"
+#if wxUSE_SLIDER
+
 #include "wx/app.h"
 #include "wx/slider.h"
 
@@ -26,16 +29,17 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID winid,
 {
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
-    SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
+    SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }
 
 wxSlider::~wxSlider()
 {
-    CocoaRemoveFromParent();
-    SetNSView(NULL);
 }
 
+#endif // wxUSE_SLIDER