Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by Marshall (Canon)
on Jan 19, 2022 at 09:56 UTC ( #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? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2022-05-21 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?