Category Menu manager menus, Object ProMenubutton

Function ProMenubuttonLocationSet


Description
Enables you to determine where in the menu the new button is placed, relative to the existing entries, which are referenced by their sequence number. You can also use this to move existing Creo Parametric menu buttons.

This function affects Menu-Manager (mode-specific) menus only.

The possible location positions are as follows:

  • -1 -- After the last item in the menu
  • 0 -- Before the first item in the menu
  • 1 -- Before the second item
  • n -- Before the nth + 1 item

All other items in the menu stay in the same order as before. You can call this function after creating a menu name with ProMenuFileRegister(), but before it appears on the screen. Otherwise, this function fails.

Synopsis
#include <ProMenu.h>
ProErrorProMenubuttonLocationSet(
ProMenuName menuname
/* (In)
The name of the menu
*/
ProMenubuttonName button
/* (In)
The name of the menu button
*/
int location
/* (In)
The new location
*/
)
Returns
PRO_TK_NO_ERRORThe function successfully set the location.
PRO_TK_GENERAL_ERRORThere was a general error and the function failed.
See Also
ProMenuFileRegister

Manual References:

  1. Pro/DEVELOP to Creo Toolkit Function Mapping: Equivalent Pro/DEVELOP Functions
  2. User Interface: Menus, Commands, and Popupmenus: Manipulating Menus

Sample Code References:

  1. pt_async ( TestAsync.c )
  2. pt_examples ( TestMenu.c )
  3. pt_userguide ( UgMenuButtonLocationSet.c )