:: com :: sun :: star :: text ::

service TextFrame
Description
specifies a rectangular shape which contains a ::com::sun::star::drawing::Text object and is attached to a piece of surrounding ::com::sun::star::drawing::Text .
Example
StarBasic

This example shows how to create a ::com::sun::star::text::TextFrame and insert it at the very beginning of ::com::sun::star::text::Text component. The macro is ready to run, if it is a script within a text document.

Sub Main 
oFrame = ThisComponent.createInstance( "com.sun.star.text.TextFrame" ) 
oFrame.Width = 6000 
ThisComponent.Text.insertTextContent( ThisComponent.Text.Start, oFrame, false ) 
oFrame.Text.String = "Hello, this text is within the frame." 
End Sub 
See also
::com::sun::star::text::Text
Developers Guide
Included Services
::com::sun::star::text::BaseFrame
Description
contains the definition of interfaces and properties that are supported by text frames, graphic objects and embeddedobjects.
Exported Interfaces
::com::sun::star::text::XTextFrame
Description
This interface makes it possible to access the text within this text frame.
Properties' Summary
long
FrameHeightAbsolute
contains the metric height value of the frame.  
long
FrameWidthAbsolute
contains the metric width value of the frame.  
byte
FrameWidthPercent
specifies a width relative to the width of the surrounding text.  
byte
FrameHeightPercent
specifies a width relative to the width of the surrounding text.  
boolean
FrameIsAutomaticHeight
If "AutomaticHeight" is set, then the object grows if it is required by the frame content.  
short
SizeType
determines the interpretation of the height and relative height properties.  
short
WritingMode
[ OPTIONAL ]
contains the writing direction, as represented by the ::com::sun::star::text::WritingMode2 constants  
boolean
IsFollowingTextFlow
[ OPTIONAL ]
controls, if the frame follows the text flow or can leave its layout environment  
Properties' Details
FrameHeightAbsolute
long FrameHeightAbsolute;
Description
contains the metric height value of the frame.
FrameWidthAbsolute
long FrameWidthAbsolute;
Description
contains the metric width value of the frame.
FrameWidthPercent
byte FrameWidthPercent;
Description
specifies a width relative to the width of the surrounding text.

If the value for "WidthPercent" is 0, the absolute value from is used.

FrameHeightPercent
byte FrameHeightPercent;
Description
specifies a width relative to the width of the surrounding text.

If the value for "HeightPercent" is 0, the absolute value from is used.

FrameIsAutomaticHeight
boolean FrameIsAutomaticHeight;
Description
If "AutomaticHeight" is set, then the object grows if it is required by the frame content.
SizeType
short SizeType;
Description
determines the interpretation of the height and relative height properties.
See also
::com::sun::star::text::SizeType
WritingMode
short WritingMode;
Usage Restrictions
optional
Description
contains the writing direction, as represented by the ::com::sun::star::text::WritingMode2 constants
IsFollowingTextFlow
boolean IsFollowingTextFlow;
Usage Restrictions
optional
Description
controls, if the frame follows the text flow or can leave its layout environment

If set, the frame follows the text flow and doesn't leaves the layout environment, which is given by its anchor, above and below. E.g.: Anchor resides in the document body then the frame doesn't leave the document body above and below and follows the text flow through the document bodies of the different pages. If not set, the frame doesn't follow the text flow and stays on the page, on which its anchor is found, but it may leave the layout environment, which is given by its anchor. E.g.: Anchor resides in the document body then the frame stays on page, where this document body is, but it could leave the document body above and below, e.g. overlapping with the page header. Note: The areas for the vertical orientation relation at page areas are interpreted in dependence to this property (

See also
BaseFrameProperties.VertOrientRelation).

 
Top of Page