根据Combobox选择更改标签 [英] Changing Labels based on Combobox selection
问题描述
我有一个名为cboGear的组合框。我在表单加载时添加了对该组合框的选择。 (即.cboGear.AddItem" Guitar",cboGear.AddItem" Amps" ;.)
我想要发生的事情是从cboGear中选择一个项目时,六个标签是我已经制作了填充信息。例如,如果吉他,从cboGear中选择,我希望label1读取,1 cord,label2读取2 extra strings,label3读取3 tuner。
I真的没有太多,如果有的话,背景在vb。我只是在业余时间自己学习,所以我很早就为无知道歉,呵呵。
I have a combo box named cboGear. I have my selections for that combo box added when the Form loads. (ie. cboGear.AddItem "Guitar", cboGear.AddItem "Amps".)
What I would like to happen is when an item is selected from cboGear, six labels that I have made will populate with info. For example if "Guitar" is selected from cboGear, I would like label1 to read, "1 cord", label2 to read "2 extra strings", label3 to read "3 tuner".
I really dont have much, if any, background in vb. I''m just learning on my own in my spare time, so I apologize for ignorance early, heheh.
推荐答案
嘿,你可以在这上面使用if语句好的:
hey you could use the if statement on this in there ok :
嘿,你可以使用那个if语句就好了:
hey you could use the if statement on this in there ok :
它是因为我使用的是文本框而不是标签,但它与文本框配合使用
lee123
it''s because i used text boxes instead of labels but it worked with text boxes
lee123
这篇关于根据Combobox选择更改标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!