用另一个组合框控制一个组合框 [英] control one combo box with other combo box

查看:66
本文介绍了用另一个组合框控制一个组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个组合框
1.包含先生,太太,小姐,主人
2.包含s/o,w/o,c/o

现在,当我选择Mr.或Master时,第二个组合框将显示s/o

????????????

i have two combo boxes
1.contain Mr.,Mrs.,Miss,Master
2.contain s/o,w/o,c/o

now when i select Mr. or Master then 2nd combo box show s/o

????????????

推荐答案

在第一个组合框上使用SelectedIndexChanged事件,然后在事件处理程序中为其设置第二个组合框的SelectedIndex组合框设置为所需值.
use the SelectedIndexChanged event on the first combobox then in the event handler for it set the SelectedIndex of the second combobox to the required value.


这篇关于用另一个组合框控制一个组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆