Help for switch-case-break code
Mon, 07/20/2020 - 01:01 pm
I'm currently working on making a listbox, and I have never done it before. I'm also new to Igor, so I've been reading help files, and looking at demo's and examples for listbox. One thing that I get confused on every time is what exactly the switch, case 1:, break does.
STRUCT WMListboxAction &lba
Variable row = lba.row
Variable col = lba.col
WAVE/T/Z listWave = lba.listWave
WAVE/Z selWave = lba.selWave
switch( lba.eventCode )
case -1: // control being killed
case 1: // mouse down
case 3: // double click
case 4: // cell selection
case 5: // cell selection plus shift key
case 6: // begin edit
case 7: // finish edit
case 13: // checkbox clicked (Igor 6.2 or later)
This is something I got when I asked Igor for my code when creating my listbox. What do the cases mean? I've looked at the help topics and I think I get confused further. Do I need to put something here to tell Igor what to do? And should I leave it at "case 1" or turn it into "case 'stuff' ", stuff being what exactly I want to do.
Sorry if this is all a jumbled mess and doesn't make sense. Please if anyone has any input, I would greatly appreciate it! And let me know if I need to be more clear with anything!
Igor Pro 8
Igor XOP Toolkit
Igor NIDAQ Tools MX