Alan Grunwald
2024-11-15 19:20:14 UTC
How do I tell the height occupied by a row (or a few rows) in a Tablelist?
tl;dr
I'm writing a GUI with a tablelist and a text widget displayed one above
the other in a paned window. I'd like to position the sash
programmatically so that the entire content of the tablelist is visible,
with the remaining space in the paned window occupied by the text widget.
I have observed that having the two widget heights in the ratio 1:3
works about right, but I'd like to get it spot on if I can.
All the rows in the tablelist are the same height, so if I knew that
height I could easily work out how much space is required for the five
or six rows that I've inserted. On the other hand, one might conceivably
have rows of different heights, so something to get the height of the
first few rows (or maybe even any set of adjacent rows) would be nice.
Thanks again (in advance)
Alan
tl;dr
I'm writing a GUI with a tablelist and a text widget displayed one above
the other in a paned window. I'd like to position the sash
programmatically so that the entire content of the tablelist is visible,
with the remaining space in the paned window occupied by the text widget.
I have observed that having the two widget heights in the ratio 1:3
works about right, but I'd like to get it spot on if I can.
All the rows in the tablelist are the same height, so if I knew that
height I could easily work out how much space is required for the five
or six rows that I've inserted. On the other hand, one might conceivably
have rows of different heights, so something to get the height of the
first few rows (or maybe even any set of adjacent rows) would be nice.
Thanks again (in advance)
Alan