Window control
Windows are the main interface between the user and
a PowerBuilder application. Windows can display information, request
information from a user, and respond to the user’s mouse
or keyboard actions.
The definition of a window includes properties, events, and
functions. The properties determine the style of the window—how
it looks. The events are actions in the window; when an event is
triggered, the associated script is executed. The functions can
trigger events in the window, manipulate or change the window, or
provide information about the window.
Properties
Every window has a style that determines how it looks to the
user. That style is governed by values assigned to the properties
of the window.
Window property |
Datatype |
Description |
---|---|---|
String |
A description of the control and/or |
|
String |
A label that briefly describes the control, |
|
AccessibleRole (enumerated) |
Describes what kind of user interface |
|
Integer |
Specifies how long an animation specified |
|
Long |
Specifies the numerical value of the |
|
Boolean |
Specifies whether the window has a border.
|
|
Boolean |
Specifies whether PowerBuilder moves
|
|
Boolean |
Causes the window to be centered when
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
ClientEdge |
Boolean |
Specifies whether the client area of
|
WindowAnimationStyle (enumerated) |
Specifies an optional animation effect |
|
Integer |
Specifies the number of columns on a PowerBuilder multiplies UnitsPerColumn by ColumnsPerPage to determine |
|
ContextHelp |
Boolean |
When WindowType = Response!,
|
Control[ ] |
WindowObject |
Contains the controls in the window. |
Boolean |
Specifies whether the Control Menu box
|
|
Boolean |
Specifies whether the window is enabled
|
|
Integer |
Specifies the height of the window, in You cannot resize minimized or maximized windows at runtime. |
|
Boolean |
Specifies whether a horizontal scroll
|
|
String |
Specifies a stock icon or an ICO file The default value is AppIcon!, which is the icon selected |
|
Integer |
Specifies the number of lines on a page. PowerBuilder multiplies UnitsPerLine by LinesPerPage to determine |
|
Boolean |
Specifies whether a Maximize Box displays
|
|
MenuID |
Menu |
Specifies the ID of a menu. PowerBuilder uses MenuID internally. To change the menu for |
String |
Specifies the name of a menu. PowerBuilder uses MenuName internally. To change the menu |
|
Boolean |
Specifies whether a Minimize Box displays
|
|
WindowAnimationStyle (enumerated) |
Specifies an optional animation effect |
|
PaletteWindow |
Boolean |
When WindowType = Popup!, this
|
String |
Specifies the name of the file containing |
|
Boolean |
Specifies whether the window is resizable.
|
|
Boolean |
Specifies that characters should be displayed
|
|
String |
Specifies the tag value assigned to the |
|
String |
Specifies the text of the window title. |
|
Boolean |
Specifies whether a title bar displays.
The user can move a window only if it has a title bar. |
|
Toolbar |
In an MDI frame window, specifies where
|
|
Integer |
In an MDI frame window, specifies the |
|
Boolean |
In an MDI frame window, specifies whether
|
|
Integer |
In an MDI frame window, specifies the |
|
Integer |
In an MDI frame window, specifies the |
|
Integer |
In an MDI frame window, specifies the |
|
Integer |
Specifies the transparency of a window. |
|
Integer |
Specifies the number of PowerBuilder To make the end of the scroll bar match the content, UnitsPerLine must PowerBuilder multiplies UnitsPerColumn by ColumnsPerPage to determine |
|
Integer |
Specifies the number of PowerBuilder To make the end of the scroll bar match the content, UnitsPerLine must PowerBuilder multiplies UnitsPerLine by LinesPerPage to determine |
|
Boolean |
Specifies whether the window is visible.
|
|
Boolean |
Specifies whether a vertical scroll bar
|
|
Integer |
Specifies the width of the window, in You cannot resize minimized or maximized windows at runtime. |
|
WindowState (enumerated) |
Specifies the state in which you want
Do not change the WindowState property in the Open event of |
|
WindowType (enumerated) |
Specifies the type of window. Values
|
|
Integer |
Specifies the X position (distance from The values of the X coordinates in all windows except child windows The workspace is the area between the sides of the window You cannot move a maximized window at runtime. |
|
Integer |
Specifies the Y position (distance from The values of the Y coordinates in all windows except child windows The workspace is the area between the sides of the window You cannot move a maximized window at runtime. |
Events
Scripts for events in a window and the controls in the window
determine how the window behaves. Scripts control the action that
is initiated when an event occurs within the window.
Window event |
Occurs |
---|---|
Just before the window becomes active. |
|
When the user clicks in an unoccupied |
|
When the window is closed. |
|
When you remove a window from display Closing any window causes PowerBuilder to close all child |
|
When the window becomes inactive. |
|
When the user double-clicks in an unoccupied |
|
When a dragged control is dropped on |
|
When a dragged control enters the window. |
|
When a dragged control leaves the window. |
|
When a dragged control is within the |
|
When the user presses the F1 key or drags |
|
Just before the window is hidden. |
|
After a Dynamic Data Exchange (DDE) server |
|
When the user presses a key and the insertion |
|
When the user presses the left mouse |
|
When the pointer is moved within the |
|
When the user releases the left mouse |
|
When a script executes the Open function |
|
When a Windows message occurs that is |
|
When the right mouse button is pressed |
|
When a DDE client application has sent |
|
When a DDE client application wants to |
|
When a DDE client application wants to |
|
When a DDE client application requests |
|
When a DDE client application has sent |
|
When the user or a script opens or resizes |
|
When a script executes the Show function |
|
When the user presses Alt or Alt plus |
|
When a specified number of seconds elapses |
|
In an MDI frame window, when the user |
Functions
The following functions can trigger events in a window, manipulate
or change a window, or provide information about a window.
You can also use the PowerScript system functions in scripts
for a window. For a list of the PowerScript system functions, see
the Browser.
Use the Open function to open a window
and the Close function to close a window. Open and Close are
system functions and are not listed here.
Window function |
Datatype returned |
Description |
---|---|---|
Integer |
Arranges the sheets or icons in the specified |
|
Integer |
Changes the menu associated with a window. |
|
String |
Returns the name assigned to the window. |
|
Integer |
Closes a DDE channel. |
|
Integer |
Removes the specified user object from |
|
Integer |
Asks a DDE server application to execute |
|
Window |
Returns the currently active sheet in |
|
Integer |
Obtains the command sent by the client |
|
Integer |
When called by the DDE server application, |
|
Integer |
Creates a reference to a context-specific |
|
Integer |
Obtains data sent from another DDE application |
|
Integer |
Determines the origin of data from a |
|
Window |
Returns the top sheet in the MDI frame. |
|
Window |
Returns the sheet that is behind the |
|
PowerObject |
Returns a reference to the name of the |
|
Integer |
Asks a DDE server application to provide |
|
Integer |
Gets the values of the Visible, Alignment, |
|
Integer |
Gets position information (coordinates) |
|
Integer |
Makes the window invisible. |
|
Integer |
Places the window in a new location specified The Move function does not move a maximized |
|
Long |
Opens a channel to a DDE server application. |
|
Integer |
Displays the specified user object, making |
|
Integer |
Displays the specified user object, making |
|
Window |
Returns the parent window of the window. |
|
Integer |
Returns the distance from the left edge |
|
Integer |
Returns the distance from the top of |
|
Boolean |
Adds an event to the end of the message |
|
Integer |
Prints the window. |
|
Integer |
Changes the size of the window to the The Resize function does not resize a minimized or maximized window. |
|
Integer |
Sends a DDE message indicating whether |
|
Integer |
Sends data to a DDE client application |
|
Integer |
Sets focus to the specified window. |
|
Integer |
Sets the MicroHelp text in the specified |
|
Integer |
Specifies the position of the window |
|
Integer |
Turns on or off automatic redrawing of |
|
Integer |
Asks a DDE server application to accept |
|
Integer |
Sets the values of the Visible, Alignment, |
|
Integer |
Sets the position of a fixed toolbar. |
|
Integer |
Makes the window visible. |
|
Integer |
Establishes a hot link with a DDE server |
|
Integer |
Establishes your application as a DDE |
|
Integer |
Terminates a hot link with a DDE server |
|
Integer |
Causes your application to stop acting |
|
Integer |
Sends an event to a window control and |
|
Object |
Returns the type of the window. |
|
Integer |
Returns the height of the workspace of The workspace is the area between the sides of the window |
|
Integer |
Returns the width of the workspace of |
|
Integer |
Returns the distance from the left edge |
|
Integer |
Returns the distance from the top of |