Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Placement of Code
Message
From
05/04/2021 04:30:00
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/04/2021 17:45:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01679489
Message ID:
01679492
Views:
60
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform