BiggP Posted November 7, 2022 Share Posted November 7, 2022 In chapter 9.10.2 of the users guide, it outlines how to populate a channel from a text file. My question is, using a script that first clears the contents of combo boxes, would I be able to repopulate these combo boxes from a text file. Instead of passing the strings to a channel, I just pass them to a combo box, using object naming. So if StrIn is the value read from the file, instead of: mychannel = strtodouble(parse(StrIn,1,",") I use MyCombobox.addchoice=StrIn Repeated for every value in list Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted November 8, 2022 Share Posted November 8, 2022 Certainly. But AddChoice is a function, not a variable so you don't use =. It would be: Component.myComboBox.AddChoice(strIn, strIn) Note that the function requires two parameters, the first is what is displayed in the combo box. The second is what is set when the particular item is selected. If you want them to be the same, you just pass the same thing as I did. Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.