Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: perl/Tk and expandable widgets

by zentara (Archbishop)
on Jun 09, 2005 at 20:25 UTC ( [id://465301]=note: print w/replies, xml ) Need Help??


in reply to Re^2: perl/Tk and expandable widgets
in thread perl/Tk and expandable widgets

I would say you are "pushing the edge" of Tk's abilities. My first inclination would be to reconfigure the header buttons after you know how wide they should be. You could scan the column for the widest entry, then reconfigure the header button text to be padded to that width. Maybe you would have to packForget and repack too. Sounds like you need to experiment a bit. :-) You can reconfigure the headers of an HList to be different text, but like I said earlier, you will run into the problems of the -width specification being different amoung different widgets. Maybe if you confine everything to a certain font?

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^4: perl/Tk and expandable widgets
by joelr (Novice) on Nov 04, 2005 at 01:30 UTC
    This thread is old, but...
    I have used a modified HList I found on CPAN called Tk::HListplus that worked quite well for this problem.,
    It uses (as an example):
    $widget->header('create', 0, -itemtype => 'resizebutton', -text => 'Pa +th');
    It allows you to double click on a header to make the column about 1 character wide (so you can grow it again) and also permits the mouse to grab the right side of the header box to adjust the column width.
    I also don't see a problem with initally having the column the correct size for the contents. I use:
    $widget->columnwidth($column_number,'');
    to make it automatic.
    I would recommend using:
    $widget = $host_box->Scrolled(qw/HListplus -scrollbars osoe/);
    so that you have enough room regardless of the host_box size.
    (1st post)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://465301]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-18 01:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found