Hot Door CORE Forum
TextView size in panel (Windows only) - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bugs (http://hotdoorcore.com/forum/forumdisplay.php?fid=5)
+--- Thread: TextView size in panel (Windows only) (/showthread.php?tid=344)



TextView size in panel (Windows only) - Rick Johnson - 04-28-2023

I don't know if this is a bug, or if I'm doing something wrong. In macOS, everything works great.

The problem occurs when a user resizes the panel, quits Illustrator, then re-launches. Illustrator remembers the panel size, but the TextView reappears at its original size (as defined in postStartup), and only resizes the TextView when the panel is manually resized again.

I've tried calling the panel's resize callback after defining the panel in postStartup, using dispatcher()->scheduleCallback, in the menu update callback, and in the callback for showing the panel, but they all fail. The TextView does resize when manually resizing the panel. When re-launching in macOS, the panel appears with the TextView at the size it was last time.

It happens in at least AI 2022 and 2023, Windows only.


RE: TextView size in panel (Windows only) - Rick Johnson - 11-28-2023

In CORE 0.8.2 this still happens. If I construct a text view or column view this way, the widget will remember its size next time it's opened:

ColumnView(const Rect& frame_, const uint16_t numCols_, const EntryVector& entries_, const std:Confusedtring& initialID_)

This creates the view without a header. The panel is resizable because the cell contents can be longer than the default width. You need to add a header for the user to be able to resize columns, which is important for the same reason the panel is resizable. If you add the header, the view will not adjust to the last size Windows users left it.

Is there a workaround?