Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Focus in optiongroup
Message
From
15/05/1999 12:52:32
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00219336
Message ID:
00219355
Views:
19
>Dragan,
>
>In the first opt put this code in the .GotFocus()
>
>
with this.parent
>   .Buttons[ .Value ].SetFocus()
>endwith
>
>this assumes the buttons are in order and you've left the value as numeric. If that's not true you might have to use the TabIndex to find the correct control.

Tried that, but then it fires when the user types the hotkey for Option1, and at that time the .parent.value still holds the old value, so this actually disables the Option1 button. I'll try to solve this by explicitly calling the optiongroup's SetFocus custom method when the parent container gets focus. So this may solve this particular case, since this OptionGroup is always the first control in this container - but then it won't be nice when tabbing back into the container, or in any other case as well.

Hmmm... maybe a This.refresh before the .Buttons[ .Value ].SetFocus() may do the trick? I'll try that.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform