From: David C. <wxp...@co...> - 2003-01-07 23:52:48
|
On Tue, 7 Jan 2003, Mattia Barbon wrote: > I don't know how to scroll it to the left, OTOH, why not create the > control bigger (the sizer will resize it?), like this: > my $control = Wx::TextCtrl->new( $frame, -1, > 'abcdefghijklmnopqrstuvwyxz0123456789', wxDefaultPosition, [600, -1]); Well, the reason is that I was calling SetSizeHints, which uses the 600 size, resulting in a wide dialog. If I call SetSize first, everything works: # Set initial width extremely wide to prevent string from scrolling my $control = Wx::TextCtrl->new( $frame, -1, 'abcdefghijklmnopqrstuvwyxz0123456789', wxDefaultPosition, [10000, -1]); # Now set to final size $control->SetSize(-1, -1, 250, -1, wxSIZE_USE_EXISTING); $sizer1->Add( $control, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 0 ); $sizer1->SetSizeHints( $frame ); Thanks, David _____________________________________________________________________ David Coppit da...@co... The College of William and Mary http://coppit.org/ One thing the blues ain't... is funny. Stephen Stills, "Black Queen" |