DEV ComboBoxEdit 控件

1、<wbr><span style="font-size:12pt; font-family:宋体">使用小结:</span> <div> <span lang="EN-US" style="font-size:12pt; font-family:NSimSun"> comboBoxEdit1.Properties.Items.Add("0-</span><span style="font-size:12pt; font-family:宋体">要显示的提示信息</span><span lang="EN-US" style="font-size:12pt; font-family:NSimSun">");</span> <p align="left"><span lang="EN-US" style="font-size:12.0pt; font-family:NSimSun"> comboBoxEdit1.Properties.Items.Add("1-</span><span style="font-size:12.0pt; font-family:宋体">要显示的提示信息</span><span lang="EN-US" style="font-size:12.0pt; font-family:NSimSun">");</span></p> <p align="left"><span lang="EN-US" style="font-size:12.0pt; font-family:NSimSun">comboBoxEdit1.SelectedIndex</span><span style="font-size:12.0pt; font-family:宋体">可以获取</span><span lang="EN-US" style="font-size:12.0pt; font-family:NSimSun">comboBoxEdit</span><span style="font-size:12.0pt; font-family:宋体">下拉框显示内容对应的数字,而不包含文本</span><span lang="EN-US" style="font-size:12.0pt; font-family:NSimSun"></span></p> <p align="left"><span style="font-size:12.0pt; font-family:宋体">即:</span></p> <p align="left"><span style="font-family:宋体; font-size:14px"><span style="line-height:27px"> </span></span><span style="line-height:30px; background-color:rgb(245,248,253); font-family:Verdana">读取comboBoxEdit选中值的方法</span></p> <div style="font-family:Verdana; line-height:30px; background-color:rgb(245,248,253)"> <div id="highlighter_515290" style="width:637.3125px; margin:1em 0px!important; position:relative!important; overflow:auto!important; font-size:1em!important; background-color:white!important"> <table border="0" cellpadding="0" cellspacing="0" style="width:637px; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace!important; min-height:auto!important"><tbody style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:auto!important"><tr style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:auto!important"> <td style="margin:0px; padding:3px; line-height:18px; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:auto!important; color:rgb(175,175,175)!important"> <div style="font-size:12px; border-width:0px 3px 0px 0px!important; border-right-style:solid!important; border-right-color:rgb(108,226,108)!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 0.5em 0px 1em!important; position:static!important; right:auto!important; text-align:right!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:auto!important; white-space:pre!important"> 1</div> </td> <td style="margin:0px; padding:3px; line-height:18px; width:609px; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; min-height:auto!important"> <div style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:relative!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:auto!important"> <div style="font-size:12px; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:auto!important; white-space:pre!important"> <code style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:18px!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace!important; min-height:auto!important">comboBoxEdit1.Properties.Items[comboBoxEdit1.SelectedIndex].ToString()</code> </div> </div> </td> </tr></tbody></table> </div> </div> <p style="margin-top:15px; margin-bottom:15px; font-family:Verdana; line-height:30px; background-color:rgb(245,248,253)"> 使用前需要先确认 comboBoxEdit1.SelectedIndex不能等于-1,不然报错。</p> <p align="left"><span style="font-size:12.0pt; font-family:宋体">2、</span></p> </div> </wbr>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值