|
-
December 9th, 2002, 03:56 PM
#1
Combo Box
Hi!
I would like to update the selected item of a combo box after a bunch of algo have been performed.
I used this:
' I first clear it
myComboBox.text = " "
' Then I set it later on in my code using the following
myComboBox.selecteditem = index
My problem is that sometimes it shows the right value, sometimes it stays blank.
Help!
Thank you
Have a nice day! (^_^)
-
December 9th, 2002, 04:32 PM
#2
any reason you don't want to use
mycomboBox.Items.Add(textBox1.Text)
mycomboBox.Items.Add(textBox2.Text)
....
-
December 9th, 2002, 04:34 PM
#3
Well the item exist. Just that I am having problem setting it into view.
Have a nice day! (^_^)
-
December 9th, 2002, 04:56 PM
#4
ok maybe I read your question wrong, sorry the list exists already and you just want to change the Drop down box text so it shows the value of "index" in the top part ?
or are you using index as a value like index = 2 therefore you want the second one to be the selecteditem ?
-
December 10th, 2002, 08:03 AM
#5
I got it set to 2. Then I clear it. After that, I want to set it to 3. I tried doing it seperately from my program and it works. I think that it might be that something overwrote it before it showed on the interface.
Thank you for your help.
Have a nice day! (^_^)
-
December 10th, 2002, 08:26 AM
#6
2 suggestions
1) mycombobox.selectedindex = 3
2) mycombobox.text = "whatever item 3 is" 'when in doubt cheat :-)
-
December 10th, 2002, 08:27 AM
#7
That's what I did in the end. I cheated :P
Plz don't tell anyone
Have a nice day! (^_^)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|