Log In    |    Knowledge Base    |    4D Home
Tech Tip: Associating a Menu Bar with a Form using the Properties dialog
Published On: June 8, 2001

By default, the behavior of a menu bar associated with a form is to APPEND the menu items in the associated menu bar to the current menu bar when the form is opened. If you instead want to swap out the entire menu bar, you must call the MENU BAR command in your code (either in a Project Method before opening the form or in the On Load event of the Form Method). To make the menu bar ACTIVE, you must still assign an Associated Menu Bar in the form properties (so you can check the "Active Menu Bar" box). If you don't want any menus appended to the menu bar you set with MENU BAR(), create an empty menu bar in the Menu Bar editor and associate that with your forms. Note that if you start a new process, you need to call MENU BAR at least once in your code to set the base menu bar.