Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox - Using Valid to Keep Focus on it is not workin
Message
De
07/07/2000 12:04:44
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00389481
Message ID:
00389542
Vues:
20
>This VALID method code will only work for certain situations and not for others...
>
> if empty(snum)
> =messagebox('Site # must be selected.', 0, 'Setsite')
> return 0
> endif
>
>I've tried all kinds of things to prevent loss of the focus.
>If I click on certain objects (cmdbuttons) it works, but if I click on a grid, focus goes to the grid.
>If I click on textboxes, I lose focus also.
>
>So, I did a work around by disabling the grid and inserting code in the textbox.gotfocus methods
>which conditionally send the focus back to the combobox. But, I still get a few occurrences of
>double activation of the messagebox in the valid.
>
>Can anyone explain the strange behavior of the VFP5 combobox?? Does VFP6 improve on it?
>Or is my use of >> RETURN 0 << considered an archaic way to keep focus on a combobox???
>
>Thanks.
>
>Steve

Hi Steve,

I don't know if there are any issues with the Valid on combos, but just out of curiosity, have you tried using the LostFocus to implement this? Don't forget, you'll need a NODEFAULT in the LostFocus event to implement there.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform