I am using a cellValueCallback in an XRT/table to speed up the performance. When I try to make a change to a cell value using XmNxrtTblCellValueContext, the change does not take affect. How can I programmatically change the cell values in an XRT/table when a cellValueCallback is being used ?
When you use a cellValueCallback in an XRT/table application you are absolving XRT/table of all responsibility of maintaining the cell values. You, as the programmer, are now responsible for maintaining the cell value structure in memory. This means context programming, like XmNxrtTblCellValueContext, with respect to the cell attributes can no longer be used.
In order to affect a programmatic change to the cell values in table, you need to modify the cell value structure that you are maintaining and then force the cellValueCallback to redicplay the cell in question.
The attached sample program will show you how to do this. When you run this program, you will see a table and a button. The button changes the cell value for one particular cell, and this is done in the changeCB() routine. This program will also allow user edits which is done through a validateCallback.