Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Editboxes
Message
From
22/04/1998 08:08:07
 
 
To
21/04/1998 10:12:24
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00093647
Message ID:
00093950
Views:
31
>Is it possible to resize the height of editboxes automatically, so that it fits to the text?
Hi Renate.

I don't know if this helps, but I recently had a need to resize edit boxes for ease of data entry/viewing. I used the following code in the DblClick Event of my edit box class to maximize/restore the edit box. I hope this helps.
LOCAL lnRow,lnColumn
IF !THIS.lMaximized
    THIS.lMaximized = .T.
    THIS.ZOrder(0)
    THIS.nOldLeft   = THIS.Left
    THIS.nOldTop    = THIS.Top
    THIS.nOldWidth  = THIS.Width
    THIS.nOldHeight = THIS.Height
    IF UPPER(ALLTRIM(THIS.Parent.baseclass)) == 'PAGE'
       THIS.Top    = THIS.Parent.Parent.Top
       THIS.Left   = THIS.Parent.Parent.Left            
       THIS.Width  = THIS.Parent.Parent.Width
       THIS.Height = THIS.Parent.Parent.Height
    ELSE                   
       THIS.Top    = THIS.Parent.Top
       THIS.Left   = THIS.Parent.Left            
       THIS.Width  = THIS.Parent.Width
       THIS.Height = THIS.Parent.Height
    ENDIF
ELSE
    THIS.lMaximized = .F.       
    THIS.Left   = THIS.nOldLeft
    THIS.Top    = THIS.nOldTop
    THIS.Width  = THIS.nOldWidth
    THIS.Height = THIS.nOldHeight
ENDIF
Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform