• Welcome to Valhalla Legends Archive.
 

Combo1.change help.

Started by GoSu_KaOs, November 30, 2004, 07:47 PM

Previous topic - Next topic

GoSu_KaOs

I don't know why this isn't workin.

Private Sub Form_Load()
Combo1.AddItem "test"
End Sub

Private Sub Combo1_Change()
txtTest.text = Combo1.text
End Sub


When I select "test" from the combobox, it doesent put anything in txtTest.text. Only when I type something in the combobox, it puts everything from the combobox to txtTest.text.

I need to make it so when you select something from the dropdown menu in the combobox ( without typing), it shows the selected item in txtTest.text.

LivedKrad

The Combo box's "change" event is only fired when the textbox portion of the box is changed, not within the box itself. As a matter of fact, when you select a new item and the item in the textbox is changed, it still isn't fired.

GoSu_KaOs

Is there a way to activate the change event when clicking on an item?

UserLoser.

Quote from: GoSu_KaOs on December 01, 2004, 10:17 AM
Is there a way to activate the change event when clicking on an item?

Call the sub "Combo1_Change"

MyndFyre

Wow guys.  Both of you flame me for flaming people, and yet both LivedKrad and UL are utterly unwilling to help this guy when it is blatantly obvious what he's asking for help with.  And one of you called me a hypocrite.  Hrm.

GoSu_KaOs: You're using the wrong event.  According to the Click event page in MSDN, in Visual Basic 6, the Click event is fired for a Combo Box control when the user selects an item, either by using the mouse or the arrow keys.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

UserLoser.

#5
Quote from: MyndFyre on December 01, 2004, 08:22 PM
Wow guys.  Both of you flame me for flaming people, and yet both LivedKrad and UL are utterly unwilling to help this guy when it is blatantly obvious what he's asking for help with.  And one of you called me a hypocrite.  Hrm.

This is yet another MyndFyre flame?  I'm sorry, I didn't flame you.  Correct me if I'm wrong one-who-knows-everything, but calling that sub is the equivalent of whatever else calling it when the combobox changes.

Quote from: GoSu_KaOs on December 01, 2004, 10:17 AM
Is there a way to activate the change event when clicking on an item?

Read that, he asked if there's a way to activate the change event.  ComboBox1_Change() is the change event.  Calling it calls the change event.  No where does it say what items he's talking about either.  Items in that combobox, items in a listbox, items in a collection, array, etc. Sorry, I'm a smartass like that.


Call ComboBox1_Change 'This calls the change event


It's ok, MyndFyre does this all the time, so why can't I do it:

MyndFyre: All you do is flame people, post with this stupid attitude like you're better than everyone else, talk about your bot (which I'm yet to see someone use), or occasionally answer someone's question.  You're 20 (if your profile is even true), grow up

MyndFyre

UL, You know damn well what the problem was that this guy was having.  Calling the sub wouldn't have fixed his problem, because by his two questions it was obvious that the functionality he wanted was to have his text box update when a different item in his combo box was selected.  You're correct, calling that sub IS the equivalent of the runtime calling it when the combobox changes, but someone who is 17 (if your profile is accurate) ought to have been able to understand his intent from the first post and respond appropriately.

UserLoser.: I do not flame people all the time, and if anybody has an attitude, it is certainly both you and LivedKrad.  I hardly ever talk about my bot, unless I'm referring to a design issue, and I could really care less whether or not someone uses it, nor do I think it's pertinent.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

GoSu_KaOs

Aight, the Combo1_Click() worked. Thx a lot.