06-08-2022 03:27 AM
Hello !
I have a little problem with my callback functions.
I have 2 ListBoxes (cf photos) , lets say that the first on top is a ListBox with Command ID and the other one is a List of Warranty Number. Each Command ID has multiple Warranty Number.
For exemple the Command ID '111' has two Warranty Number that are "1" and "2".
For now, when I click on a label from the Command ID ListBox, It shows on the Warranty Number ListBox every Warranty Number that has the Command ID that we clicked on.
I put a CheckBox next to the two ListBoxes to sort the Warranty Numbers by a boolean value that is in the structure of the Warranty Number . (I hope I didn't lost everyone , I'm trying to explain but my english is really bad)
My problem is with my checkBox, I want to change the values that are in the Warranty ListBox by pressing the CheckBox, but i don't know how to do it because the Warranty ListBox and the CheckBox has two different CallBack Functions ...
Can someone help me ?
Thanks in advance
Solved! Go to Solution.
06-08-2022 04:23 AM - edited 06-08-2022 04:25 AM
First of all, your explanation seems in contrast with the discussion title: based on the images you posted, the listboxes are on the same panel (and I suppose the checkbox as well) so what have those images to do with different panels?
Having said this, let me clarify one concept: in a CVI program you can have several panels loaded and visible at the same time; each of them will have its proper handle and you can address controls on each panel by using the appropriate handle. So ther's no problem in handling two panels and passing values frome one to another: simply save panel handles, read from one panel with its handle and write to the other with the appropriate (different) handle.
Now passing to your problem, which seems to me it's the sorting of data: if you can use a table instead of a listbox and show the boolean value on one column you can sort the table by that column in a very simple manner. Take a look at colview.prj example that ships with CVI (Hint: to locate an example use the Example finder: Help >> Find Examples... menu item, next open the Search tab and search for "Table": it will show all the examples that refers to the table control, from which you can choose the one you are interested into)
06-08-2022 07:34 AM
Hello,
yes you're right , i totally misundertand what was the panel argument in the callback function 🙂
Thanks a lot for your answer !!