从列表框中选择和取消选择 [英] Select and de-select from a list box

查看:108
本文介绍了从列表框中选择和取消选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个相同形式的列表框和几个按钮,它们对列表中的选择执行操作。

现在,我希望用户一次只能从一个列表中选择。例如,如果用户已经从list1中选择了一个项目并且他/她从list2中选择了另一个项目,则取消选择list1。


任何人都可以帮忙????


谢谢

I have 4 list boxes in the same form and few buttons which performs operation on the selection from the list.
Now, I want the user to only select from one list at a time. For example if user already has selected an item from list1 and he/she selects an other item from list2 then list1 be de-selected.

Can any one help????

Thanks

推荐答案


我有4个相同形式的列表框和几个按钮,对列表中的选择执行操作。

现在,我希望用户只有一次从一个列表中选择。例如,如果用户已经从list1中选择了一个项目并且他/她从list2中选择了另一个项目,则取消选择list1。


任何人都可以帮忙????


谢谢
I have 4 list boxes in the same form and few buttons which performs operation on the selection from the list.
Now, I want the user to only select from one list at a time. For example if user already has selected an item from list1 and he/she selects an other item from list2 then list1 be de-selected.

Can any one help????

Thanks



在一个列表框中选择一个项目,您可以将其他项目传递给一个相当简单的功能,如下所示...

ClearOut List0

ClearOut List1

ClearOut List2

When an item is selected in one listbox, you can probably pass the others to a fairly simple function, something like this...
ClearOut List0
ClearOut List1
ClearOut List2

展开 | 选择 | Wrap | 行号



当在一个列表框中选择一个项目时,你可以将其他人传递给一个相当简单的功能,就像这样...

ClearOut List0

ClearOut List1

ClearOut List2
When an item is selected in one listbox, you can probably pass the others to a fairly simple function, something like this...
ClearOut List0
ClearOut List1
ClearOut List2
展开 | 选择 | Wrap | 行号



我有4个相同形式的列表框和几个按钮,它们对列表中的选择执行操作。

现在,我希望用户一次只能从一个列表中选择。例如,如果用户已经从list1中选择了一个项目并且他/她从list2中选择了另一个项目,则取消选择list1。


任何人都可以帮忙????


谢谢
I have 4 list boxes in the same form and few buttons which performs operation on the selection from the list.
Now, I want the user to only select from one list at a time. For example if user already has selected an item from list1 and he/she selects an other item from list2 then list1 be de-selected.

Can any one help????

Thanks



这个应该这样做:

This should do it:

展开 | 选择 | Wrap | 行号


这篇关于从列表框中选择和取消选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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