LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fill a combo box based on another one

I'm used to VB and I am having trouble getting my head around some LabVIEW concepts.

If I have 2 combo boxes on a form, how do I fill the second one based on the first?
I have attached what I have done so far (you can probably see how new I am to this!)

The VB code would be
Select Case cboLineSize.ListIndex

Case 0 'GR900
cboLength.Clear
cboLength.AddItem "125 mm"
cboLength.AddItem "15 mm"
cboLength.ListIndex = 0

Case 1 'Type-N
cboLength.Clear
cboLength.AddItem "125 mm"
cboLength.AddItem "7.5 mm"
cboLength.ListIndex = 0

Case 2 'PC-7
cboLength.Clear
cboLength.AddItem "100 mm"
cboLength.AddItem "7 mm"
cboLength.ListIndex = 0

Case 3 'PC-3.5
cboLength.Clear
cboLength.AddItem "75 mm"
cboLength.AddItem "16 mm"
cboLength.AddItem "4 mm"
cboLength.ListIndex = 0

Case 4 'K-connector
cboLength.Clear
cboLength.AddItem "60 mm"
cboLength.AddItem "10 mm"
cboLength.AddItem "2.5 mm"
cboLength.ListIndex = 0

Case 5 'PC-2.4
cboLength.Clear
cboLength.AddItem "50 mm"
cboLength.AddItem "15 mm"
cboLength.AddItem "2.5 mm"
cboLength.ListIndex = 0
Case Else
MsgBox "Not an option"
Exit Sub

End Select

Message Edited by opticyclic on 05-16-2005 01:00 PM

0 Kudos
Message 1 of 4
(2,494 Views)
Just fill it using property nodes. The attached quick example shows one possibility. (I only added a few random options for the first three selections).
0 Kudos
Message 2 of 4
(2,483 Views)
Hi,

Here it is. Hope you can understand it,
If you need any explanation about it don't hesitate to ask.
Paulo
0 Kudos
Message 3 of 4
(2,482 Views)
Thanks both of you.
Its always good to have two different perspectives on how to do something!
0 Kudos
Message 4 of 4
(2,462 Views)