首页 相关文章 快速找到选中的OptionButton

快速找到选中的OptionButton

OptionButton控件经常是作为控件数组存在的,要快速找到其中的哪一个被选中,可以使用下面的代码:

'假设控件数组包含3个OptionButton控件

intSelected=Option(0).Value*0-Option(1).Value*1-Option(2).Value*2

注意,因为第一个操作数总是0,所以上述代码可以精简如下:

intSelected=-Option(1).Value-Option(2).Value*2

->

[ 查看全文 ]

2016-02-19 标签:

快速找到选中的OptionButton的相关文章

手机页面
收藏网站 回到头部