Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Freeze top row in Tk::TableMatrix

by ldln (Pilgrim)
on Jan 17, 2009 at 17:50 UTC ( [id://737056]=note: print w/replies, xml ) Need Help??


in reply to Re: Freeze top row in Tk::TableMatrix
in thread Freeze top row in Tk::TableMatrix

Hm, I didn't quite understand what this code did regarding disabling top row vertical resize (or any row for that matter). As far as I can see, all rows still can be resized?!

Replies are listed 'Best First'.
Re^3: Freeze top row in Tk::TableMatrix
by zentara (Archbishop) on Jan 17, 2009 at 20:02 UTC
    From your limited description of the problem in the original node, I thought you were talking about how the header row of the table can get squished down to non-visible upon resizing the whole window. My script stopped the crushing, so the header row remained totally readable, while still allowing you to scroll the data. Otherwise, explain better what you want to see. The widget is difficult to deal with, and you may want to go to a better widget giving you more control. The only one in Tk is the canvas, and you can setup a scrolling table easily in it.

    I'm not really a human, but I play one on earth Remember How Lucky You Are
      Sorry, my mistake for beeing unclear in my description of the problem. I will try again.

      I have a Tk::TableMatrix::SpreadSheet table which I fill with data. In columns in top row I have button widgets, which when clicked sorts data in in the table and then repopulates it with sorted data.
      We can adjust size of cells by "clicking and dragging" on table borders. What I would like is the top row to maintain the same height all the time - that is make it impossible to resize it vertically.

      I guess we have to poke into the Spreadsheet.pm (or TableMatrix.pm) file and see how it operates?

        If you post a minimal working example, maybe someone will see a way. My first thought is to somehow bind to the window resize, and then do some adjustments. Or maybe put your sort buttons in a separate frame above the spreadsheet and try to figure out how to align the buttons with the columns.
        $mw->bind( '<Configure>', sub{ &OnResize });
        Or switch to Gtk2, which has a good table widget support, where you can individually set the expand,shrink,and fill setting for each table element.

        I'm not really a human, but I play one on earth Remember How Lucky You Are

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-28 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found