10-21-2011 09:48 AM
Hi,
Trying to get back in LabWindows/CVI so I hope you can offer some help?
We are trying to rewrite some LabView functions, we do not have the source code.
At this point we have an ini file with a number of sections, one of which has a large number of entries, 141, at present, which we are displaying to a Text box, for the moment.
We need to do the following:
Thanks for the help
Simon
10-21-2011 10:58 AM - edited 10-21-2011 11:00 AM
Happy to hear you here again!
I would suggest to move from a textbox to a table: the table control has some built-in sorting and finding facilty that can simplify the task of finding the desired element.
To select and activate, I normally set a callback for the table into which I trap the event EVENT_LEFT_DOUBLE_CLICK and use GetTableCellFromPoint (panel, control, MakePoint (eventData2, eventData1), &cell); to retrieve the cell the user clicked on. Pay attention at the help for 'Panel coordinates' field.
10-26-2011 02:13 AM
Hi,
Thanks Roberto this is good.
Along with GetTableCellVal (PANEL, PANEL_ProductSelectTABLE,activeCell, CelValue) I was able to get to where I wanted to be.
Thanks
Simon
10-26-2011 03:58 AM
Just as a side note, in the line GetTableCellVal (PANEL, PANEL_ProductSelectTABLE, activeCell, CelValue); the highlighted parameter should be the panel handle, not the resource ID assigned to the panel in the UIR editor. It may happen that the line works if those values are equal, but this is just a coincidence that cannot be guaranteed in every condition.