按下箭头键后,Listview失去了焦点 [英] Listview lost focus after pressing arrow key

查看:76
本文介绍了按下箭头键后,Listview失去了焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当发现搜索文本后Listview失去焦点时,我遇到了问题,我按向上或向下箭头键...我希望,如果我按向上箭头键,则所选值将位于所选项目的正前方.与向下箭头键相同.当前所选项目之后的项目将突出显示.

感谢前进!

问候,
Chaegie

Hi,

I have a problem when listview losses its focus once search text is found and i press arrow up or down key... i expect that if i press arrow-up key the selected value would be the item right before the selected item.. the same with the arrow down key.. once pressed. item after the current selected item will be highlighted.

Thanks n advance!

With regards,
Chaegie

推荐答案

Chaegie,

您必须为此处理键盘输入.在该已处理函数中,您必须为上箭头编写Listview_id.selectedIndex = Listview_id.selectedIndex-1,为下箭头编写+1.

不管您想要什么,都可以设置selectedItemStyle属性.
Hi Chaegie,

You''ve to handle keyboard inputs for this. in that handled function you''ve to write Listview_id.selectedIndex=Listview_id.selectedIndex-1 for up arrow and +1 for down arrow.

Thn set selectedItemStyle property whatever look you want.


这篇关于按下箭头键后,Listview失去了焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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