DefaultFilePath

IntegralHeight

This is one of those properties that makes you look good to your users—or maybe we should say, without it, you don't look so good. It lets you indicate that the height of a list box, edit box or text box should be adjusted so that it fits an exact number of lines and doesn't leave any partial lines showing.

Usage

lWholeLinesOnly = oObject.IntegralHeight
For edit boxes and list boxes, IntegralHeight moves up the visible bottom of the control to cut off any partial lines. For text boxes, the visible bottom is moved up to show exactly one line of text. In this case, the actual height of the control isn't changed, but part of it isn't shown.

For edit boxes and text boxes, if the box is too small for even a single line of text, the actual Height of the box is increased to accommodate one line.

If a list box is too small for one line, however, setting IntegralHeight to .T. makes the display so small you can't see even a partial line of text.


Although you can't change IntegralHeight at runtime, the controls are smart enough to resize themselves if something like the font size changes. However, with a list, if you make the font big enough that not even one whole item fits in the original height, the list shrinks to show a single line of pixels. We think this one's a bug, too, and we have some pretty good ideas about what needs to be fixed in the internal code.

Example

* A builder might set IntegralHeight for all * the relevant controls on a form. ASELOBJ(aForm,1) aForm[1].SetAll("IntegralHeight",.t.)

See Also

Height


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net