03-01-2021 02:27 AM
Does anyone have an idea as to how to go about implementing a toggle button in a table cell? I am fairly new to coding in CVI and I do understand and was successfully able to insert a regular button into the table cell. However, I would like to know if anyone has been successful in adding a toggle button to the table cell. Thank you for your assistance.
04-05-2021 11:28 AM
Hi,
Have you tried getting the Panelhandle of the existing command button and change the controlstyle of the button by using int NewCtrl (int panelHandle, int controlStyle, char controlLabel[], int controlTop, int controlLeft).
Probably this may be helpful.
04-06-2021 06:12 PM
The table control does not integrate a native toggle button so you'll have to replicate it programmatically with a bit of effort on your side.
Attached a modified version of CVI TableCells example program that handles a column with a toggle button for you to examine: it may require some coding more to replicate the exact functionality of a toggle button but it is a functional framework to start with.