in reply to scroll HList widget
There is no affect. What I need is to move the xscrollbar to the rightmost end.Weel that code doesn't compile (but you knew that). On the other hand, seems to work just fine for me (see below), so if you're still having problems you'll have to show more code.
update:use strict; use Tk; my $mw = tkinit; my $t = $mw->Scrolled( 'Text', -scrollbars => 'se', -wrap => 'none', -width => 10, -height => 10 )->pack( -side => 'right' ); $t->insert( '0.0', "yo ho ho and a bottle of rum yo ho ho and a bottle of rum yo ho ho and a bottle of rum yo ho ho and a bottle of rum yo ho ho and a bottle of rum yo ho ho and a bottle of rum" ); # uncomment if you wnat to see "yo ho ho" $t->xview( moveto => 1 ); my $dt = $mw->Scrolled( 'DirTree', -scrollbars => 'se', ) ->pack( -expand => 1, -fill => 'both', -side => 'top' ); # this one has no effect # unless you update first # $dt->update; $dt->xview( moveto => 1 ); $mw->Button( # always works -text => "move it (this works)", -command => sub { $dt->xview( moveto => 1 ); } )->pack; MainLoop;
|
|---|