[wxGTK] wxTLW not scrollable (was: segfault with Dialog)
Vadim Zeitlin
vadim at wxwidgets.org
Wed Jun 20 14:17:48 PDT 2007
On Wed, 20 Jun 2007 21:14:42 +0530 Lloyd <lloyd at cdactvm.in> wrote:
L> What could be wrong with this code?
L>
L> void MyFrame::OnAbout( wxCommandEvent& WXUNUSED( event ) )
L> {
L> wxDialog* d=new wxDialog(this,wxID_ANY,wxT("hai"),wxDefaultPosition,
L> wxDefaultSize, wxRESIZE_BORDER|wxCLOSE_BOX|wxVSCROLL|wxHSCROLL);
L> d->Show();
L> d->SetScrollbar(wxHORIZONTAL,1,10,100);
L> }
L>
L> The code crashes at SetScrollbar().
L>
L> How can I set the scroll bar for a dialog with resizable border?
You currently can't do this in wxGTK (I'd really appreciate if you could
mention your platform (and wx version) as this does not crash under MSW and
so I could have saved the time spent on testing it there). The top level
windows in this port don't support scrolling at all, you need to create a
child wxWindow inside them.
Of course, there should still be no crash so we should probably add the
necessary checks to prevent it from happening -- unless there is a way of
making wxTLWs scrollable in wxGTK too? Is there, Robert?
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list