Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make edit box grow in height?
Message
 
 
To
11/02/2007 15:21:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01194581
Message ID:
01194589
Views:
8
>>>>>
>>>>>You can change the .Height property, perhaps in the InteractiveChange() Event. But here is another idea: How about making it higher on entry (GotFocus()), and smaller on exit
>>>>(LostFocus())?
>>>>
>>>>Well, I don't want the editbox to become smaller in height. Actually I want it to grow until it will show 4 lines (or some set number of lines). The idea of using InteractiveChange is nice but how do you determine in this method if the entire length of the editbox has entry?
>>>>
>>>>Thank you for your help.
>>>
>>>Well, since you will pressumably use a variable-sized font, you would have to do some calculations with TxtWidth().
>>
>>Thank you Hilmar. This should get me on the right track.
>
>I am not sure; it does look tricky. For a single line, you can get the width in pixels quite easily. For several lines, you have to consider page breaks. Or put up with an approximation.

I think I will have to increase the height of the edit box once it "hits" the end of the line. Then, I will just set the height to some set value and let the scrollbar "deal" with it.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform