Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best Placement of Code
Message
De
05/04/2021 04:30:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
04/04/2021 17:45:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01679489
Message ID:
01679492
Vues:
59
>Howdy and greetings all,
>
>I have the below listed code in my textbox Interactive Change box. My goal is to visibly place an error box around the textbox if an data entry error occurs, in think case, if it's empty. Would a better placement of this be in the Valid method?
>
>IF EMPTY(ALLTRIM(this.Value))
> This.parent.First_Name_Error_Shape.Visible = .T.
>ELSE
> This.parent.First_Name_Error_Shape.Visible = .F.
>ENDIF

Yup, and your valid method would be a two-liner

This.parent.First_Name_Error_Shape.Visible = EMPTY(ALLTRIM(this.Value))
return not This.parent.First_Name_Error_Shape.Visible

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
Répondre
Fil
Voir

Click here to load this message in the networking platform