10-19-2017 10:18 PM
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.
Solved! Go to Solution.
10-20-2017 08:35 AM
Given that the table control does not integrate a toggle button cell type, you will need to implement this mechanism by yourself reacting to mouse clicks and keyboard events (normally toggle button are operated with Enter and spacebar keys); visual aspect of the toggle will need to be implemented by changing the image shown on the cell with some sort of marked/unmarked sign.
I suggest you to take a look at chess example that ships with CVI (you'll find with by searching for "tables" in the example finder: Help >> Find examples... menu item). That example is built across a big table control that you can operate with the mouse "moving" the pieces across the chessboard: you'll find examples of how to intecept mouse clicks, how to manipulate the image shown on a cell and other useful hints.