This is what I like about your efforts, you never give up on us seeking to learn, and for that thank you.
But yes I am aware of the fact that they are numbered progressively as one adds objects from the toolbox.
But I believe the system is struggeling with the fact that combobox1 has no property named "SelectedIndexChanged" (which comes after the "." trailing after combobox1 in Your method example)
Does anyone have a working example of selectedindexchanged (combobox)
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Does anyone have a working example of selectedindexchanged (combobox)
It was an example and not I ntended to be just copied into you form.
Take this code and add it to you "SelectedIndexChanged event.
$items = if($this.Text -eq 'ListOfLetters){@('A','B','C')}else{){@('1','2','3')}
$comboBox2.Items.Clear()
$comboBox2.Items.AddRange($items)
Take this code and add it to you "SelectedIndexChanged event.
$items = if($this.Text -eq 'ListOfLetters){@('A','B','C')}else{){@('1','2','3')}
$comboBox2.Items.Clear()
$comboBox2.Items.AddRange($items)
Re: Does anyone have a working example of selectedindexchanged (combobox)
I am familiar with the formulation of this content (corrected for what I believe was a typo on your behalf)
The problem resides in the fact that the event is not working, and combobox2 is not presenting content at all,
Your idea Works, thanks for the help, it turned out to be the typo that stopped it from working.
combobox1_SelectedIndexChanged instead of combobox1.SelectedIndexChanged (underscore instead of a period)
and the closing apostrophee after listofletters along with an extra closing paranthesis.
Many thanks for a rich learning experience once again.
Code: Select all
$items = if ($this.Text -eq 'ListOfLetters'){@('A','B','C')}else{@('1','2','3')}
$comboBox2.Items.Clear()
$comboBox2.Items.AddRange($items)
Your idea Works, thanks for the help, it turned out to be the typo that stopped it from working.
combobox1_SelectedIndexChanged instead of combobox1.SelectedIndexChanged (underscore instead of a period)
and the closing apostrophee after listofletters along with an extra closing paranthesis.
Many thanks for a rich learning experience once again.
Re: Does anyone have a working example of selectedindexchanged (combobox)
I agree, but you were not very far off and your proposed solution was the correct one.
I did view the example, that did help.
Thanks
I did view the example, that did help.
Thanks