Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Focus in optiongroup
Message
De
15/05/1999 12:52:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00219336
Message ID:
00219355
Vues:
18
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform