in reply to Re^8: Query the height of Tk::Text widget with word wrap (tk without no tray icon overrideredirect splashscreen state zoomed deiconify
in thread Query the height of Tk::Text widget with word wrap

Thanks, I will play around with those things.
To be clear, the 3-4 secs is the calculation/display itself.
This table is refreshed every time the user runs a query (possibly hundreds of times in one session).
Up until now, I drew the same table by directly inserting text into the TableMatrix widget and setting approximate row heights based on the number of characters in each cell. That took well under half a second for 500 rows. Here, I need to refresh a widget 500 times for the calculation and then draw 500 widgets for display, and this takes 3-4 sec. It's not intolerable as the first ones show up immediately, but it seems like it should be possible to do it quicker.

Also, when I display a table that takes up the whole screen and then the next search produces only one hit (i.e. only one row needs to be displayed), the hits from the previous search remain there (not all of them, only the top ones that fit on the screen). The TableMatrix widget is correctly resized, but the Text widgets remain there anyway. I tried to update the $mw and the frame the table is in, but that doesn't help. I tried to delete the text from those widgets; the text disappears but the outline of the widget stays. I tried to destroy the widgets and that clears the screen, but it causes an error the next time I try to create a widget in the same cell. I have several columns, so each Text widget is created with
my @tw; [...] $tw[$row][$col] = $mw->Text()
  • Comment on Re^9: Query the height of Tk::Text widget with word wrap (tk without no tray icon overrideredirect splashscreen state zoomed deiconify
  • Select or Download Code