About windows – PB Docs 70

About windows

Windows form the 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.

A window consists of:

  • Properties,
    which define the window’s appearance and behavior (for example,
    a window might have a title bar or a Minimize box)
  • Events (windows have events
    like other PowerBuilder objects)
  • Controls placed in the window

At the window level

When you create a window, you specify its properties in the
Window painter’s Properties view. You can also dynamically
change window properties in scripts during execution.

You can write scripts for window events that specify what
happens when a window is manipulated. For example, you can connect
to a database when a window is opened by coding the appropriate
statements in the script for the window’s Open event.

At the control level

You place PowerBuilder controls (such as CheckBoxes, CommandButtons,
or MultiLineEdits) in the window to request and receive information
from the user and to present information to the user.

After you place a control in the window, you can define the
style of the control, move and resize it, and build scripts to determine
how the control responds to events.

Designing windows

Each operating environment (such as Microsoft Windows or UNIX)
has certain standards that graphical applications are expected to
conform to. Windows, menus, and controls are supposed to look and
behave in predictable ways from application to application.

This chapter describes some of the guidelines
you should follow when designing windows and applications, but a
full discussion is beyond the scope of this book. You should acquire
a book that specifically addresses design guidelines for applications
on your target platform and apply the rules when you use PowerBuilder to
create your application. You might want to look at the following:

  • For Microsoft Windows: The
    Windows Interface Guidelines for Software Design: An Application
    Design Guide

    , from Microsoft Press
  • For UNIX: OSF/Motif Style Guide
    ,
    produced by the Open Software Foundation and published by Prentice
    Hall

Building windows

When you build a window, you:

  • Specify the appearance
    and behavior of the window by setting its properties
  • Add controls to the window
  • Build scripts that determine how to respond to events
    in the window and its controls
    To support these scripts, you can define new events for the
    window and its controls, and declare functions, structures, and
    variables for the window.

Two ways

There are two ways to build a window. You can:

  • Build a new window
    from scratch
    You use this technique to create windows that aren’t
    based on existing windows
  • Build a window that inherits its style, events,
    functions, structures, variables, and scripts from an existing window
    You use inheritance to create windows that are derived from
    existing windows, thereby saving you time and coding.

For more information

For information on building windows from scratch, see “Building a new window”.

For information on using inheritance to build a window, see “Using inheritance to build
a window “
.


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