Error getting tags :
error 404Error getting tags :
error 404 formattedHeight | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
formattedHeight
Basics
Expander triangle
Type
Property
Syntax

get the formattedHeight of object

get the formattedHeight of [chunk of] field

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Reports the height needed by an object to display its full contents without scrolling.
Examples

set the height of field 1 to the formattedHeight of field 1
put the formattedHeight of the clickLine into selectedHeight
get the formattedHeight of word 1 to 17 of field "Info"

Additional Comments
Expander triangle

Use the formattedHeight property to determine how much vertical space an object needs. For example, if your stack has a field whose contents change for each card, use the field's formattedHeight property in an openCard handler to resize the field for its contents on each card.

Value:

The formattedHeight of an object is a positive integer. The object must be on the current card of an open stack.

This property is read-only and cannot be set.

Comments:

If you specify a card or group, the formattedHeight reports the height of a rectangle that includes all objects in that card or group whose visible property is true.

If you specify an image or player, the formattedHeight property reports the original un-scaled height of the image or movie.

If you specify an object in a group, the value reported is the formattedHeight that object requires for the current card, so if you want to get the formattedHeight of a field's text on a certain card, you must go to that card first.

The formattedHeight of a chunk in a field is the amount of vertical space that portion of the field's text requires, taking line breaks into account.

User Comments
Expander triangle
User thumbnail
Devin Asay
StarStarStarStarStar
Apr 9, 2009
I use the formattedHeight property in a handy routine to turn on/off scrollbars as needed. Just call it every time you change the content of a field.


command enableScrollbarIfNeeded pFldName
if the formattedHeight of fld pFldName > the height of fld pFldName then
set the vScrollbar of fld pFldName to true
else
set the vScrollbar of fld pFldName to false
end if
end enableScrollbarIfNeeded