4D v13.4SET MENU BAR |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
SET MENU BAR
SET MENU BAR
SET MENU BAR replaces the current menu bar with the one specified by menuBar for the current process only. In the menuBar parameter, you can pass either the number or name of the new menu bar. You can also pass a menu ID (MenuRef type, 16-character string). When you work with references, the menus can be used as menu bars and vice versa (see the Managing Menus section). Note: The name of a menu bar may contain up to 31 characters and must be unique. The optional process parameter changes the menu bar of the specified process to menuBar. Note: If you pass a MenuRef in menuBar, the process parameter serves no purpose and will be ignored. The optional * parameter allows you to save the state of the menu bar. If this parameter is omitted, SET MENU BAR reinitializes the menu bar when the command is executed. For example, suppose that SET MENU BAR(1) is executed. Next, several menu commands are disabled using the DISABLE MENU ITEM command. If SET MENU BAR(1) is executed a second time, either from the same process or from a different process, all menu commands will revert to their initial enabled state. If SET MENU BAR(1;*) is executed, the menu bar will retain the same state as before, and the menu commands that were disabled will remain disabled. Note: If you pass a MenuRef in menuBar, the * parameter serves no purpose and will be ignored. When a user enters the Application environment, the first menu bar is displayed (Menu Bar #1). You can change this menu bar when opening a database by specifying the desired menu bar in the On Startup database method or in the startup method for an individual user. The following example changes the current menu bar to menu bar #3 and resets the states of the menu commands to their original states: SET MENU BAR(3) The following example changes the current menu bar to the menu bar named “FormMenuBar1” and saves the states of the menu commands. Menu commands that were previously disabled will appear disabled. SET MENU BAR("FormMenuBar1";*) The following example sets the current menu bar to menu bar #3 while records are being modified. After the records have been modified, the menu bar is reset to menu bar #2, with the menu state saved: SET MENU BAR(3) In this comprehensive example, we will create, by programming, a menu bar including the following File and Edit menus: `Method for creating File menu |
PROPERTIES
Product: 4D
INDEX HISTORY
Modified: 4D v11 SQL SEE ALSO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||