ListBox not updating Selwave
hegedus
I have created a simple listbox (from the window recreation macro):
ListBox DataFiles,pos={5,98},size={250,250},font="Arial",fSize=12
ListBox DataFiles,listWave=root:Working:ListOfFiles
ListBox DataFiles,selWave=root:Working:FileSelector,mode= 2,selRow= 4
When I click on a cell the selwave, FileSelector does not update. All the values are zero and it does not respond to clicks. If I go into edit mode and open the list box, the correct cell id is shown as selected. The box displays correctly with no errors.
Wave: ListOfFiles
Type: TEXT Size: 1218 bytes
Rows: 45 Units: None Start: 0 Delta: 1
Note: None
Wave: FileSelector
Type: I8 Size: 365 bytes
Rows: 45 Units: None Start: 0 Delta: 1
Note: None
Where have I gone wrong?
I have created s simple experiment with the code from the manual and it seems to work correctly.
selWave= sw sw is a numeric wave with the same dimensions as listWave. It is optional for modes 0-2, 5 and 6 and required in all other modes.
In modes greater than 2, sw indicates which cells are selected. In modes 1 and 2 use ControlInfo to find out which row is selected.
Your mode is 2. The current selection can be determined using ControlInfo, or if you have an action procedure attached to the ListBox, when eventCode is 4 or 5 the selected row is available from the row member of the WMListboxAction structure.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
December 13, 2013 at 09:24 am - Permalink