c_w_k Posted January 11, 2010 Report Share Posted January 11, 2010 Hello, I'm sure this is going to be a simple solution, but I'm trying to simply populate a combo box with values that have been put into a string array. I can get the first element of the array to show up in the combo box but not the second element. Any solutions or ideas would be greatly appreciated. I've attached the section of code that I'm trying to accomplish this with. I'm trying to get the name of the devices (which i get back from a dll), I put the names of the devices into the stringOptions array, and then I input the stringOption array into the String values of the Combo Box properties node....this will show the first element of the array in my combo box, but not the second. Thanks CK Quote Link to comment
jcarmody Posted January 12, 2010 Report Share Posted January 12, 2010 I'm not sure I follow the description of your problem. My first thought was that you're trying to do this: ... which clearly works for me. What am I misunderstanding? Quote Link to comment
c_w_k Posted January 12, 2010 Author Report Share Posted January 12, 2010 I'm not sure I follow the description of your problem. My first thought was that you're trying to do this: ... which clearly works for me. What am I misunderstanding? Thats what I am trying to do, except with a string array, their are only 2 elements in my array right now but I can only see the "0" element of the array. The string array that I am using is dynamic, based on how many devices are found on the network it could contain 2 or more elements. I'm using a local variable of the array to plug into the combo box properties node. also, I can see both elements in the actual array....just not in the combo box. Quote Link to comment
Gary Rubin Posted January 12, 2010 Report Share Posted January 12, 2010 Thats what I am trying to do, except with a string array, their are only 2 elements in my array right now but I can only see the "0" element of the array. The string array that I am using is dynamic, based on how many devices are found on the network it could contain 2 or more elements. I'm using a local variable of the array to plug into the combo box properties node. also, I can see both elements in the actual array....just not in the combo box. Not sure if this answers your question, but could you use a listbox? It provides a property node that allows you to adjust the number of visible rows. Quote Link to comment
jcarmody Posted January 12, 2010 Report Share Posted January 12, 2010 [...] I can see both elements in the actual array....just not in the combo box. When you say you can't see both elements in the combo box, are you saying that only one is in the drop-down list or that you want to see both of them without clicking on anything? Quote Link to comment
c_w_k Posted January 12, 2010 Author Report Share Posted January 12, 2010 When you say you can't see both elements in the combo box, are you saying that only one is in the drop-down list or that you want to see both of them without clicking on anything? Right, only 1 was in the drop down list, even when I extended the list.....however, after looking over all pieces of my code I found an error .....it was only gathering 1 piece of information into the array...therefore there was only 1 element....thats why I was not seeing the second element. The post you made above worked fine for me as well both with integers and strings......sorry for the false issue, I appreciate your efforts in trying to help me. Thanks CK 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.