Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto Grow an Edit Box
Message
From
28/09/2008 09:38:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01351074
Message ID:
01351375
Views:
22
>I need to have an edit box extend vertically if the user enters more text than will fit. The edit box will not have scroll bars. There will be a limit to the size and I can easily handle that part. I'm just not sure of the best way to handle the auto sizing. Is there some event that gets triggered when the text goes below the box? I thought of using memlines() but is there an easier way?
>TIA

Here is an alternative design, which I used at Bata/Bolivia. The idea was to save space on the form. Instead of growing as a function of the amount of text, the EditBox shows only a few lines - say, 3 lines. On GotFocus, its size increases - say, to 10 lines, but WITH scrollbars. On LostFocus, the size is changed to 3 lines again. This allows the user easy editing.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform