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

Building two windows with similar definitions – PB Docs 2021 – PowerBuilder Library

Building two windows with similar definitions – PB Docs 2021

Building two windows with similar definitions

Assume your application needs two windows with similar
definitions. One window, w_employee, needs:

  • A title (Employee Data)

  • Text that says Select a file:

  • A drop-down list with a list of available employee
    files

  • An Open button with a script that opens the selected file in
    a multiline edit box

  • An Exit button with a script that asks the user to confirm
    closing the window and then closes the window

The window looks like this:

win14.gif

The only differences in the second window, w_customer, are that
the title is Customer Data, the drop-down list displays customer files
instead of employee files, and there is a Delete button so the user
can delete files.

Your choices

To build these windows, you have three choices:

  • Build two new windows from scratch as described in Building a new window.

  • Build one window from scratch and then modify it and save it
    under another name

  • Use inheritance to build two windows that inherit a
    definition from an ancestor window

Using inheritance

To build the two windows using inheritance, follow these
steps:

  1. Create an ancestor window, w_ancestor, that contains the
    text, drop-down list, and the open and exit buttons, and save and
    close it.

    Note

    You cannot inherit a window from an existing window when
    the existing window is open, and you cannot open a window when
    its ancestor or descendant is open.

  2. Select File>Inherit, select w_ancestor in the Inherit
    From dialog box, and click OK.

  3. Add the Employee Data title, specify that the
    DropDownListBox control displays employee files, and save the
    window as w_employee.

  4. Select File>Inherit, select w_ancestor in the Inherit
    From dialog box, and click OK.

  5. Add the Customer Data title, specify that the
    DropDownListBox control displays customer files, add the Delete
    button, and save the window as w_customer.


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