X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7520f3da332d64a676b6f7d27a56004fabf2db36..ae51cebbe62f759cdee2f4548249393472b7baa5:/src/motif/scrolbar.cpp?ds=sidebyside diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp index 5b19681cf3..9c35d48ea3 100644 --- a/src/motif/scrolbar.cpp +++ b/src/motif/scrolbar.cpp @@ -40,6 +40,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, { if( !CreateControl( parent, id, pos, size, style, validator, name ) ) return false; + PreCreation(); wxSize newSize = ( style & wxHORIZONTAL ) ? wxSize( 140, 16 ) : wxSize( 16, 140 ); @@ -53,9 +54,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, (wxOrientation)(style & (wxHORIZONTAL|wxVERTICAL)), (void (*)())wxScrollBarCallback ); + PostCreation(); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, newSize.x, newSize.y); - ChangeBackgroundColour(); return true; } @@ -125,6 +126,8 @@ static void wxScrollBarCallback(Widget widget, XtPointer clientData, XmScaleCallbackStruct *cbs) { wxScrollBar *scrollBar = (wxScrollBar*)wxGetWindowFromTable(widget); + wxCHECK_RET( scrollBar, _T("invalid widget in scrollbar callback") ); + wxOrientation orientation = (wxOrientation)wxPtrToUInt(clientData); wxEventType eventType = wxEVT_NULL;