Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I Resize a form based on textbox value
Message
From
11/12/1998 12:08:02
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00166623
Message ID:
00166629
Views:
17
>I have a form that contains a textbox more or less the width of the form. I need to be able to resize the width of the form based on the size of the text in the textbox.
>
>Thank you
The following 'code' may give you some idea:
thisform.label1.caption="qqqq"+thisform.label1.caption
thisform.lockscreen=.t.
thisform.label1.visible=.t.
thisform.label1.visible=.f.
thisform.lockscreen=.f.
thisform.width=thisform.label1.width

Label1 is invisible label, but containing the same text (as caption) as real form.textbox. Label.Autosize=.t. You may call similar code any time you change Textbox.Value, e.g. from Textbox.Interactive/Programmaticchamge event.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform