jay Posted May 10, 2011 Report Share Posted May 10, 2011 Hi, Really simple question, but I can't seem to find the answer. I have a combo box on the front panel that I dynamically populate with items at runtime with sound devices attached to the terminal, and I would like to programmatically select a device in the combo box as a 'default' if that particular device is attached i.e. scan devices at startup, search devices, if a particular device is attached then display that device in the combo box, effective making the selection for the user. It's still important that the user is still able to use the drop down list to select another device if they so choose. Can someone please describe how I can select a particular item in the list to display as a default choice? I assume there is a property that can be set - but for the life of me I cannot find it. Thanks. Quote Link to comment
Antoine Chalons Posted May 10, 2011 Report Share Posted May 10, 2011 Hi, Really simple question, but I can't seem to find the answer. I have a combo box on the front panel that I dynamically populate with items at runtime with sound devices attached to the terminal, and I would like to programmatically select a device in the combo box as a 'default' if that particular device is attached i.e. scan devices at startup, search devices, if a particular device is attached then display that device in the combo box, effective making the selection for the user. It's still important that the user is still able to use the drop down list to select another device if they so choose. Can someone please describe how I can select a particular item in the list to display as a default choice? I assume there is a property that can be set - but for the life of me I cannot find it. Thanks. Hi, You can use a property node to set the "value" or the "value (signaling)" property of your combo box, the difference between the two is that the first one will NOT generate a value change event on the combo box (event that you might want to detect with an event structure). So, populate you combo box with you device list, check if a known device is connected, if yes, set the combo box value to the name of that connected device. Quick example attached in LV 8.6 Hope this helps combo box.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.