question

ksugai avatar image
0 Likes"
ksugai asked Jason Lightfoot answered

How to dynamically change column width of GUI Table

I want to change column width of a GUI table when a string that is too long to fit in a cell is written to the table.

cellwidth.jpg

I added subnodes to the cellwidth attribute, and I am changing the value of them under "VIEW:/active" during simulation. However, they are not reflected in the displayed table.

Also, There is no change even if I run "repaintall()" command.

If there is a way to dynamically change column width of GUI Table, please let me know.


FlexSim 23.0.11
guitablecellwidth
cellwidth.jpg (15.4 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

You should use repaintview where the view is the table view:

eg:

treenode view=node("VIEW:/active/GUI 12651353864/table2");  // path to the active table view in a test model.
cellwidth(view).subnodes[3].value=20;  //width of column 3
repaintview(view);


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.