LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving from a list..

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:

 

  1. To find in the displayed list a particular product, by typing if possible. At the moment it is a scroll bar and then select.
  2. On selection (double click or click and OK) of this product go off and perform some action

 

Thanks for the help

Simon

0 Kudos
Message 1 of 4
(2,976 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(2,973 Views)

Hi,

 

Thanks  

 

Along with GetTableCellVal (PANEL, PANEL_ProductSelectTABLE,activeCell, CelValue) I was able to get to where I wanted to be.

 

Thanks

Simon

0 Kudos
Message 3 of 4
(2,957 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(2,954 Views)