我只想从一个列表框中交换5个项目到另一个 [英] I want to swap only 5 item from one listbox to other

查看:64
本文介绍了我只想从一个列表框中交换5个项目到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个列表框,当我单击moveleft按钮时,值交换到另一个列表框.但是我只希望将5个值交换给其他对象,然后再显示一个错误.我该怎么做

i have 2 list boxes and when i click on moveleft button then the value swap to the other listbox . But i want that only 5 value swap to other and after that it show an error. How can i do that

推荐答案

计算您进行的移动数量,并在按钮达到或超过该值时禁用按钮或引发错误.
或计算新列表框中的项目数并执行相同的操作,以最适合您的应用程序的方式为准.

我们无法提供更多详细信息-我们无法在此处看到您的代码...

[edit]错字-OriginalGriff [/edit]
Count the number of moves you make, and disable the button or raise an error when it meets or exceeds that value.
Or count the number of item in the new list box and do the same, whichever is most applicable to your application.

More details we can''t give - we cannot see your code from here...

[edit]Typo - OriginalGriff[/edit]


这篇关于我只想从一个列表框中交换5个项目到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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