Add
controls to the window
Contents
Where you are
Change the tab order on
the window
Code some Help events
and preview the window
Write the script to
open the window
Controls allow users to interact with PowerBuilder objects, such as
windows and DataWindows. You set properties of these controls and later
add script for control events and functions.
Selecting a control button from the
PainterBar
You can add controls from the Insert menu or by selecting a control
button in PainterBar1. Unless you customize your toolbars, there is only
one control button that appears in the PainterBar. When you first open a
painter, PainterBar1 includes the CommandButton control button, which has
a down arrow to its right. Clicking the down arrow displays a drop-down
list of control buttons.
Some of the controls you can select from the drop-down list are
described in the table below:
|
Button appearance |
Control type |
Use in tutorial |
|---|---|---|
|
|
CommandButton |
Default icon for the control button in PainterBar1. |
|
|
Picture |
To add a picture to the login window. |
|
|
PictureHyperlink |
Not used in tutorial. Its purpose is to provide a |
|
|
PictureButton |
Not used in tutorial. It is like a command button, |
|
|
StaticText |
To add text labels to the login |
|
|
StaticHyperLink |
To provide a link to a website. |
|
|
SingleLineEdit |
To add user entry text boxes to the login |
|
|
MultiLineEdit |
Not used in tutorial. Its purpose is to add a |
After you select a control, it appears in place of the CommandButton
button on PainterBar1.
Adding controls with a 3D appearance
To make your controls look three dimensional, select
Design>Options from the menu bar and make sure that the Default To 3D
check box is selected on the General page of the Options dialog box. You
can change the window background color from the default color of
ButtonFace gray using the Properties view in the Window painter.
Now you modify the login window you just created by adding controls
and changing some of their properties. You:







