const wxSize& size, long style,
const wxValidator& validator,
const wxString& name)
-{
- m_macIsUserPane = false;
-
+{
+ DontCreatePeer();
+
m_macMinimumStatic = NULL;
m_macMaximumStatic = NULL;
m_macValueStatic = NULL;
SetPeer(wxWidgetImpl::CreateSlider( this, parent, id, value, minValue, maxValue, pos, size, style, GetExtraStyle() ));
+#if 0
if (style & wxSL_VERTICAL)
// Forces SetSize to use the proper width
SetSizeHints(10, -1, 10, -1);
// NB: SetSizeHints is overloaded by wxSlider and will substitute 10 with the
// proper dimensions, it also means other people cannot bugger the slider with
// other values
-
+#endif
+
if (style & wxSL_LABELS)
{
m_macMinimumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
event.SetEventObject( this );
HandleWindowEvent( event );
- wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId );
+ wxCommandEvent cevent( wxEVT_SLIDER, m_windowId );
cevent.SetInt( value );
cevent.SetEventObject( this );
HandleWindowEvent( cevent );
// yet another hack since this is a composite control
// when wxSlider has it's size hardcoded, we're not allowed to
// change the size. But when the control has labels, we DO need
+
// to resize the internal Mac control to accommodate the text labels.
// We need to trick the wxWidgets resize mechanism so that we can
// resize the slider part of the control ONLY.
if (GetWindowStyle() & wxSL_LABELS)
{
- // make sure we don't allow the entire control to be resized accidently
+ // make sure we don't allow the entire control to be resized accidentally
if (width == GetSize().x)
m_minWidth = -1;
}