in reply to Screen width of string in proportional font
try this:
use strict; use warnings; use Tk; my $mw = tkinit; my $s = 'text'; my $b = $mw->BrowseEntry->pack; $mw->Button(-text => 'add entry', -command => sub{$b->insert('end',$s.='-foo'); $b->updateListWidth; } )->pack; MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Screen width of string in proportional font
by pdsx (Initiate) on Jan 29, 2010 at 19:17 UTC |