SetGeometry
protoTXView:SetGeometry(isPaged, width, height, margins)
Changes the geometrical characteristics of the view.
DISCUSSION
- isPaged
- Specifies whether the text is laid out in many pages, with text flowing from one page to another (with dotted lines visible between pages), or bounded by one box. Use
true
to indicate that the text is paged, ornil
to indicate that all text is contained in one box. The default value isnil
.
- A page break inserted into a non-paged view has no effect. However, the page break pasted into a paged view does cause a page break.
- width
- The width of the text bounds, or the page width if isPaged is
true
. This value is expressed as an integer number of pixels, and includes the left and right margins. The default value is the width of the view (as specified in theviewBounds
rectangle).
- height
- The height of the text bounds, or the page height if isPaged is
true
. This value is expressed as an integer number of pixels, and includes the top and bottom margins. The default value is the height of the view (as specified in theviewBounds
rectangle).
- margins
- A rectangle that specifies the margins of the page or text box. The rectangle is specified as a frame with four slots:
top
The indent from the top edge of the view rectangle, expessed as a number of pixels.
left
The indent from the left edge of the view rectangle, expessed as a number of pixels.
bottom
The indent from the bottom edge of the view rectangle, expessed as a number of pixels.
right
The indent from the right edge of the view rectangle, expessed as a number of pixels.
- To specify no margins at all, use a rectangle in which all four values are
0
.
- return value
- An error code, or
nil
if the operation worked.
You can call this method at any time to change the geometrical characteristics of your word-processing view.
- IMPORTANT
- You cannot change the isPaged characteristic once the
ViewSetupDoneScript
has executed. If you attempt to change isPaged after that time, the new setting is ignored.![]()
Methods for Getting Information
This section describes the methods you can use to retrieve information about the content of a word-processing view.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help