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

Adding a menu bar to a window – PB Docs 2018 – PowerBuilder Library

Adding a menu bar to a window – PB Docs 2018

Adding a menu bar to a window

To have a menu bar display when a window is opened by a user,
you associate a menu with the window in the Window painter.

To associate a menu with a window

  1. Click the Open button in the PowerBar, select the window
    with which you want to associate the menu, and open the
    window.

  2. Do one of the following:

    • In the Properties view for the window, enter the name of
      the menu in the MenuName text box on the General tab
      page.

    • Click the Browse button and select the menu from the
      Select Object dialog box, which lists all menus available to
      the application.

    • In the Select Object dialog box, you can search for a
      menu by clicking the Browse button.

  3. Click Save to associate the selected menu with the
    window.

Identifying menu items in window
scripts

You reference menu items in scripts in windows and controls
using the following syntax:

You must always fully qualify the menu item with the name of the
menu.

When referring to a menu item in a drop-down or cascading menu,
you must specify each menu item on the path to the menu item you are
referencing, separating the names with periods.

For example, to refer to the Enabled property of menu item
m_open, which is under the menu bar item m_file in the menu saved in
the library as m_menu, use:

Changing a window’s menu at
runtime

You can use the ChangeMenu function in a script to change the
menu associated with a window at runtime.


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