
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM
|
TEXT
Get the height of an Edit Field
I think this is one of the _many_ useful functions from function junction ii, an excellent buy if i ever made one...
CLEAR LOCAL FN getFieldHt(theFld)
'---------
' Calculate the height of a styled
' text edit field. NOTE: You cannot
' make this calculation in an open
' printer port.
'---------
DIM TEHndl&,chrCount
DIM thePoint&;0,pointY,pointX
DIM fldTop,fldHeight
TEHndl&=TEHANDLE(theFld)
LONG IF TEHndl&
chrCount= {[TEHndl&] + _TELength}
thePoint&=FN TEGETPOINT(chrCount,TEHndl&)
fldTop= {[TEHndl&]}
fldHeight=pointY - fldTop
XELSE
fldHeight=0
END IF
END FN=fldHeight : REM getfieldht
|