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.
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;
update: and of course I've pasted an example of a Text, not a HList widget. I'll update soon. update complete (kept the pirate talk :D).
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | | ** The third rule of perl club is a statement of fact: pod is sexy. |
| [reply] [d/l] |