Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Changing text – PB Docs 90 – PowerBuilder Library

Changing text – PB Docs 90

Changing text

You can specify the text and text display characteristics
for a control in the Properties view for the control. You can also
use the Window painter StyleBar to change:

  • The text itself
  • The font, point size, and characteristics such as
    bold
  • The alignment of text within the control

note.gif CommandButton text Text in CommandButtons is always center aligned.

The default text for most controls that have a text property
is none. To display an
empty StaticText or SingleLineEdit control, clear the Text box in
the Properties view or the StyleBar.

When you add text to a control’s text property, the
width of the control changes automatically to accommodate the text
as you type it in the StyleBar, or when you tab off the Text box
in the Properties view.

proc.gif To change text properties of controls:

  1. Select one or more controls whose properties
    you want to change.

  2. Specify changes in the Font tab page in the Properties
    view, or specify changes using the StyleBar.

How text size is stored

A control’s text size is specified in the control’s
TextSize property. PowerBuilder saves the text size in points, using
negative numbers.

For example, if you define the text size for the StaticText
control st_prompt to be 12 points,
PowerBuilder sets the value of st_prompt’s TextSize
property to
-12. PowerBuilder uses negative numbers
to record point size for compatibility with previous releases, which
saved text size in pixels as positive numbers.

If you want to change the point size of text during execution
in a script, remember to use a negative value. For example, to change
the point size for st_prompt to 14
points, code:

You can specify text size in pixels if you want, by using
positive numbers. The following statement sets the text size to
be 14 pixels:


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