Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: Tk performance and "UpdateWrapper: Failed to create container"

by Marshall (Canon)
on Jan 19, 2022 at 09:56 UTC ( [id://11140603]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Tk performance and "UpdateWrapper: Failed to create container"
in thread Tk performance and "UpdateWrapper: Failed to create container"

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11140603]
help
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-04-16 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found