LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Get value from an other panel / change name Panel ?

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 3
(872 Views)
Solution
Accepted by topic author estelle27

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)



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 2 of 3
(862 Views)

Hello,

 yes you're right , i totally misundertand  what was the panel argument in the callback function 🙂

 

 

Thanks a lot for your answer !!

0 Kudos
Message 3 of 3
(843 Views)