126 CHAPTER 4 WORKING WITH (Email web hosting) REALBASIC MENUS

126 CHAPTER 4 WORKING WITH REALBASIC MENUS Controlling Access to Menu Items By default, REALbasic automatically enables every menu item you add to a menu system. At times, though, you may want to prevent users from being able to click a particular menu item. You may want to disable a menu item to prevent the user from being able to click it at certain times during the execution of the application. For example, you may want to disable a menu item that enables the user to save a file as long as no file has been opened or as long as the user has not made any changes to an opened file. Later on, once the user has opened a file and made changes to it, you can programmatically enable the menu item. Note, a disabled menu item is still visible, but it is grayed out and cannot be selected. Note For a menu item to perform an action, you must associate program code with it. Until you do so, the menu item remains grayed out and the user is unable to select it. If a menu item should not be enabled when the application first starts, you should deselect its AutoEnable property. Later, at the appropriate time, you can programmatically enable the menu item, using a statement similar to the following: MenuHandlerName.AutoEnable = True In this statement, MenuHandlerName is a placeholder representing the name of the menu item you want to enable. The remainder of the statement simply instructs REALbasic to enable the menu item, enabling the user to select it. Tip When deselected (or set to False), a menu remains disabled until the user clicks the menu that contains it, at which time you can programmatically determine if it is appropriate to enable the menu item. For example, the Cut and Copy menu items on the Edit menu are only enabled when a selection has been made within an application. Enabling these menu items when nothing has been selected does not make sense. Reconfiguring Menu Organization REALbasic is extremely flexible in the manner in which it lets you build menus, and create submenus and menu items. REALbasic adds new menus just to the right of the currently selected menu and it adds new menu items just beneath the currently selected menu item. At times, though, you might decide you want to change the order in which your menus or menu items are presented. REALbasic makes it easy to move things around the want you want them.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply