Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I suppose that you saw set_col_width($table,@col_heads); #THIS WILL CAUSE A SCREEN REFRESH! set_col_width() shows setting the width of individual columns specified in characters. In the demo, they all wind up being the same width, but of course they don't have to be. Due to perhaps proportional fonts, num of chars may not be the best measurement, but I think it is likely that you can come up with a heuristic that will work well.

I found out that set_col_width() caused a screen refresh. I called that after say a column sort operation to update the screen. Anyway, this is a fast operation.

In my application, I had an array structure ["headingname", width], etc. And I was fine with a "one size fits all" judgment of the width needed for each type of column. Mileage varies, I have no idea of what your data looks like.

TableMatrix is a complicated GUI object. There are many, many options. I didn't use any color options, but that is a possibility. I did implement different behavior for left mouse click vs right mouse click within a cell and that worked out very well.

Designing a good GUI can take a lot of effort. There were no existent GUI's for the class of application I was developing. I spent a couple of months carefully thinking through the information I wanted to display to the user. Doing something cool for the first time is hard.


In reply to Re^5: Tk performance and "UpdateWrapper: Failed to create container" by Marshall
in thread Tk performance and "UpdateWrapper: Failed to create container" by olgo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found