LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can user change column size with table as "Indicator"?

In my application, the Labwindows/CVI table is setup in "indicator" mode so that data can be displayed within the table, but not changed by the user.  However, sometimes a data value will exceed the column width and the application needs to let the user resize the columns.  While it is rather easy to do resizing when the table is in Hot, Validate, or Normal mode, I cannot find a way that allows column resizing while the table is set as an Indicator. 
 
Does anyone know how to allow a table to have its columns resized by the user while not allowing the cell contents to be edited by the user?
 
Thank you in advance,
Jim
 
0 Kudos
Message 1 of 3
(3,339 Views)
You can always resize the columns programmatically, using SetColumnAttribute, after determining the maximum text width of your cells with GetTextDisplaySize. But this is admittedly, a bit cumbersome.

Another, probably easier, alternative is to not make the table an indicator, but instead make individual cells indicators. These can be all the cells in the table, if you wish. This is how you'd do it:

    SetTableCellRangeAttribute (panel, control, VAL_TABLE_ENTIRE_RANGE, ATTR_CELL_MODE, VAL_INDICATOR);

Luis
NI


0 Kudos
Message 2 of 3
(3,336 Views)

Luis,

Thank you very much for that solution.  It works perfectly!

Jim

0 Kudos
Message 3 of 3
(3,331 Views)