Method XbpMenu():currentPos() Foundation

Returns the current position of the menu.

Syntax
:currentPos() --> aPos
Return

This method returns an array containing two elements: { nX, nY }. This array contains the x and y coordinates for the lower left corner of the Xbase Part.

Description

The method :currentPos() retrieves the current position of an XbpMenu object. The origin for the coordinates is the point {0,0} in the parent's coordinate system.

Method :currentPos() can only be used with XbpMenu objects which are visible on the screen, eg. after the call to method :popUp(). If a menu is added to another menu object as a submenu, the return value of :currentPos() is undefined whenever the submenu is not displayed.

The position of an XbpMenu object is implicitly defined by the position specified when calling method :popUp(). The position of an XbpMenu object created as a submenu cannot be changed. Instead, the window used to display a submenu is maintained automatically by the operating system.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.