LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling an item in list box

hi,
    Hw can i disable an item in a listbox dynamically?? Can anyone help me... Is it possible to add an array of elements into it and then disable?? Can anyone help me with an example program???
 
 
Thanks
Jay
0 Kudos
Message 1 of 10
(5,360 Views)
Hi Jay,
why do you start another thread? Did you try it with the property node? Where do you have problems?
 
 
Mike


Message Edited by MikeS81 on 08-04-2008 01:44 PM
Message 2 of 10
(5,357 Views)
hi mike,
            My requirement is to configure the ports in my pc and allocate each one for some task. Ill display the ports installed in the pc on a listbox,available resource wud be enabled and busy ports should be disabled. This is my requirement.
 
 
 
 
Thanks
Jay 
0 Kudos
Message 3 of 10
(5,351 Views)
Hi,

MikeS81 is absoltely right, it is best to use property nodes.  Here's an alternative way of doing it.  Attached in LV 8.2
0 Kudos
Message 4 of 10
(5,348 Views)

Hi Jay,

ok, so create an array with all available ports and one with the busy ports. From this two arrays, you can create the array with disabled indexes.

Mike



Message Edited by MikeS81 on 08-04-2008 01:53 PM
0 Kudos
Message 5 of 10
(5,347 Views)
hi mike,
             Im now able to disable an item in a listbox but still have a small issue....
As i told u my requirement i would find the available resources and allocate each one for a task. But for opening a port if i use visa configure or visa open im facing a problem. The problem is that im allowed to use only visa resource name as the input for visa open. Im not able to use any  other control say a listbox's item or a combo box. if i use, an error pops up saying there is not sufficient information about the resource Why is it so?? is there any alternative for this? i also tried setting the value to the visa resource name using the value property  in property node but since it is in a loop the value is not updating for every loop instead the first value is alone retained. Say if i have com1 com2 and lpt1 in my pc, ill use a for loop and read the values one by one and check if it is available. First time it takes com1 but the next time it does not takes com2. This is the exact situation. Can u help me to resolve this issue?
 
 
 
Thanks
Jay
0 Kudos
Message 6 of 10
(5,309 Views)
Hi Jay,
use the find resources function. You can also connect a string to the configure serial port fuction. See the attached picture please.

Hope it helps.
Mike
Message 7 of 10
(5,307 Views)

hi mike,

            It is working now. Thank you very much for your support and response mike. You have been giving great support and i hope this continues. Thanks once again :).

 

 

 

Thanks

Jay

0 Kudos
Message 8 of 10
(5,300 Views)
hi,
    how to enable an item in a list box dynamically?
 
Thanks
Jay
0 Kudos
Message 9 of 10
(5,291 Views)

Hi Jay,

you can enable an element if you don´t disable it. Read the array of disabled elements, delete the one you want to be enabled and write it back to the prperties.

Mike

Message 10 of 10
(5,288 Views)