Alignment – PB Docs 150

Alignment property for PowerScript controls

Controls

Controls that display text

Description

For most controls that display text, the alignment property
specifies the alignment of all the text in the control. Text can
be centered, left aligned, or right aligned.

For RichTextEdit controls, each paragraph has its own alignment
setting, including Center, Left, Right, and Justify.

Usage

In a painter

proc.png To specify text alignment for controls other than
RichTextEdit:

  1. On the General page of the control’s
    Properties view, select an alignment from the Alignment drop-down
    list, or click the Left, Center, and Right alignment buttons in
    the StyleBar. Use the StyleBar to set the alignment for several
    selected objects at once.

proc.png To align text in paragraphs in RichTextEdit controls:

  1. Select text in the paragraphs to be aligned.

  2. Right-click on the selection to display the text
    object’s property sheet, and select the alignment setting.

proc.png To allow alignment at runtime (RichTextEdit only):

  1. On the Document tab page of the control’s
    Properties view, check either the Toolbar or the PopMenu check box.

    At runtime, users select the text to align with the mouse
    and then right–click on the text to invoke a pop-up menu,
    or select an alignment button on the StyleBar.

In scripts

The datatype of the Alignment property is the Alignment enumerated
datatype. It has four values: Center!, Left!, and Right! apply to
all controls with text; Justify! applies only to RichTextEdit controls.

For example, the following line specifies center alignment
for a MultiLineEdit control:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x