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

PopMenu – PB Docs 2022 – PowerBuilder Library

PopMenu – PB Docs 2022

PopMenu

PowerScript function

Description

Displays a menu at the specified location.

Applies to

Menu objects

Syntax

Argument

Description

menuname

The fully qualified name of a menu on a menu bar you want
to display at the specified location

xlocation

The distance in PowerBuilder units of the displayed menu
from the left edge of the window

ylocation

The distance in PowerBuilder units of the displayed menu
from the top of the window

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, PopMenu returns null.

Usage

If the menu object is not associated with the window so that it was
opened when the window was opened, you must use CREATE to allocated memory
for the menu (see the last example).

If the Visible property of the menu is false, you must make the menu
visible before you can display it as a pop-up menu.

The coordinates you specify for PopMenu are relative to the active
window. In an MDI application, the coordinates are relative to the frame
window, which is the active window. To display a menu at the cursor
position, call PointerX and PointerY for the active window (the frame
window in an MDI application) to get the coordinates of the cursor. (See
the examples.)

Calling PopMenu in an object script

PopMenu must be called in an object script. It should not be
called in a global function.

Examples

These statements display the menu m_Emp.M_Procedures at location
100, 200 in the active window. M_Emp is the menu associated with the
window:

This statement displays the menu m_Appl.M_File at the cursor
position, where m_Appl is the menu associated with the window.

These statements display a pop-up menu at the cursor position. Menu4
was created in the Menu painter and includes a menu called m_language.
Menu4 is not the menu for the active window. NewMenu is an instance of
Menu4 (datatype Menu4):

In an MDI application, the last line would include the MDI frame as
the object for the pointer functions:


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