Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing value in Destroy()
Message
From
17/01/1999 21:54:48
 
 
To
17/01/1999 21:43:06
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00177015
Message ID:
00177058
Views:
41
>>If I clean up the prompt on lostfocus, the user will no longer have the prompt as a guide.
>
>Isn't it enough to restore the prompt in the gotfocus event?
>
Hi Vlad,

Here's the process for the ShadowText class of textbox objects.

When the textbox is displayed, it shows shadowtext in a special promptext color. Shadow text is a prompt which describes briefly the information which is to be entered into the textbox. Shadowtext is contained in a udp called (amazingly :), ".shadowtext".

When the textbox received focus, indicating that the user is about to enter information, the shadowtext is replaced with blank. Otherwise there is the concern that the user (1) will become confused and/or (2) will merely edit or add to the prompt text -- which is not what I want.

When the user leaves the textbox (lostfocus) one of two event occurs. If the user has not entered anything, then the shadowtext is redisplayed. If the user has entered something, the user entry is displayed.

Hence, I want the shadowtext to display _only when_ (1) nothing has been entered in the textbox and (2) the box does not have focus.

The purpose of the shadowtext is to replace a descriptive label for the textbox on a container on which I do not have room for descriptive labels.

Unless I remove the shadowtext before the textbox is destroyed, the shadowtext is stored to the controlsource table -- causing a few problems here and there. Hence I need to set .value = "" where the .value = .shadowtext before (or during) the destruction of the textbox.

I have a method that determines whether the textbox is displaying only shadowtext. So finding that it contains shadowtext is easy. The problem was that .value could not be changed during destroy().

I just solved that problem with a process suggested by David Frankenbach.

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform