Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linking a textbox/control to another
Message
From
26/04/2000 19:46:53
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00363869
Message ID:
00363893
Views:
20
>>>>In texbox2
>>>
>>>>linkcontrol = thisform.textbox1
>>>>linktop = 0
>>>>linkleft = 5
>>>
>>>>I am looking for a function to handle in this way.
>>>
>>>Doing on the fly...
>>>
>>>texbox2.Init
>>>
>>>DODEFAULT() - Well I always use in this way
>>>this.top = EVALUATE(this.linkcontrol).top + EVALUATE(this.linkcontrol).linktop
>>>this.left = EVALUATE(this.linkcontrol).left + EVALUATE(this.linkcontrol).width + EVALUATE(this.linkcontrol).linktop
>>>
>>>I'm a bit losed in the EVALUATES, I think in this way shouldn't work. How must be?
>>
>>You're on the right track. Just leave the EVALUATE() off of the LinkTop and LinkLeft properties since they belong to your current object. Be aware that this now makes you're object instanciation order significant now.
>
>But... do you know how must I do this?
>
>linkcontrol = "thisform.texbox1" or linkcontrol = thisform.texbox1
>
>EVALUATE(this.linkcontrol).top or EVALUATE(this.linkcontrol.top)
>
>Well haven't tried, will go to test now.

If you make the LinkControl property hold the object reference (just this.LinkControl = thisform.TextBox1) then you would just do:
this.Left = this.LinkControl.Left + this.LinkControl.Width + this.LinkLeft
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform