Simulating option button group focus

bandi
10-22-2009, 07:19 PM
Hi all,

I have created an owner-draw usercontrol with some extended functionality as a replacement for the standard vb option button. Everything is working as expected with the exception of how focus is passed between these controls.

When a group of standard option buttons are placed on a form and one is selected, hitting the tab key will skip the rest of the option buttons in the group and move onto the next control. I am wanting to simulate this functionality, but cant figure out how to go about it.

Currently, my user controls act as a group ok, but hitting the tab key passes focus to each control in the group in succession.

I thought of using the CanGetFocus or ForwardFocus properties for the none selected controls, but these properties are only available at authoring time, not run time. I also thought about disabling none selected controls, but then you lose mouse events and cant click on the control to select it.

Does anybody have any insights into how I can acheive this group type focus?

Thanks
Anthony

vb5prgrmr
10-22-2009, 10:24 PM
TabStop T/F, TabOrder



Good Luck

bandi
10-25-2009, 03:34 PM
Doh! thanks vb5prgrmr. I initially didn't even think of the tab stop property as it's not exposed inside the user control. Talk about shorted-sightedness :)

Included this as part of the group handling and everything appears to be working a treat now!

Cheers,
Anthony

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum