简体   繁体   中英

Change label text on particular option selected from combobox in vb.net

I need something if particular option selected in combobox then label text should be changed which will be pre defined. Eg If I select Option A then label should display 10 & if select Option B then labele shows 15.

Step 1: Create a combobox that has two items. One with value 10 and text "A" and other with value "15" and text "B"

Step 2: Now create selectedIndexChange event for combobox.

Step 3: Inside selectedIndexChange event write the code to set the label text with {comboboxID}.SelectedValue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM