开发者

problemwith tab index in windows application user control

开发者 https://www.devze.com 2023-03-01 13:57 出处:网络
I create an user control that has some textbox and buttons.the problem is when I use tab to traverse in My form when my usercontrol ge开发者_StackOverflow社区t focus the focus go inside of user contro

I create an user control that has some textbox and buttons.the problem is when I use tab to traverse in My form when my usercontrol ge开发者_StackOverflow社区t focus the focus go inside of user control and buttons insid if it would focus.How I can simply go to next control after my user control not inside it?

thanks


If the controls have Focusable CanHaveFocus TabStop sort of properties, set them to false.

Also set the TabIndex properties of those controls to 0. I'm sure that the controls will be ghosts in terms of getting tab focus.


Set TabStop property on your custom user control elements which you want to exclude (eg. your button) to false.

0

精彩评论

暂无评论...
验证码 换一张
取 消