Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp 8.0 newbie question
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00836708
Message ID:
00836806
Views:
11
>actually, this doesn't work. if i have an object with .top=50 and i then set it to .top=100, the .resettodefault("top") method set .top=0.
>
>
>>>i am basically adding a "reset to default button" and want the text box to return to its original position of ".top=100". i am assuming that value is accessible and i don't have to create a variable to store it.
>>>
>>
>>you could use the .ResetToDefault() method of the textbox:
>>
>>textbox.resettodefault("top")

Nancy,
It sounds like you moved the object after it was created. An example of this would be to position the object after instantiation if the form resized.

Getting away from the .Top example, if you want to reset to any value other than the value that existed when the object was first created, you will need to store the value you want in some custom property and create a custom method to do it.

Now you can override the ResetToDefault() method in your subclasses. You could put code in there to read the custom property and assign the value. You could also add the NODEFAULT keyword so VFP's ResetToDefault internal behavior doesn't take place.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform