|
Creating menus (Inspections)
|
|
|
|
|
Monday, 21 July 2008
|
HTML clipboard I. Introduction A control menu displays a menu customized for your application. A menu may include orders, securities sub-menus and bars separation. You can create menus which contain up to four levels of sub-menus. II. Creator of menus, dialog To create a menu, use the Creator of menus. Enter the name of Menu in the area Caption. To create a bar of separation, simply type a hyphen (-) in the area Caption. To view a tick left of the name of a menu item, check the box next to Checked.
 Although some properties menu controls can be identified in the Creator of menus, all properties of these controls are available in the Properties window. To view the properties of a control Menu, select its name in the subject area of the upper part of the Properties window. When you create an application MDI, the menu bar of the leaf MDI daughter replaces that of the object MDIForm daughter when the leaf is turned on. II-A. Options dialog Caption You can enter names or menu command that will appear on your menu bar or in a menu. If you want to create a bar separating in your menu, type a simple hyphen (-) in the area Caption. To allow the user to access the menu through the keyboard, insert a character (&) before a letter. Upon execution, this letter is underlined (the & character remains invisible), and the user can access the menu or the command by pressing ALT and the letter. If you want a & character appears in the menu, type & consecutive two characters in the legend. Name You can enter a name for the Control menu item. The name is an identifier used only to access the menu item in the code. It does not appear in the menu. Index You can assign a numerical value, which determines the position of control within a group of controls. This position has no relation to the position on the screen. Shortcut You can select a keyboard shortcut for each order. HelpContextID You can assign a numerical value for the unique identifier context. This value is used to find the appropriate item in the help file identified by the Help File property. Negotiate Position You can select property Negotiate Position menu. This property determines if the menu appears in a leaf container and, if so, at what location. Checked You can add a check to the left of a menu item. It is generally used to indicate if an option dump is validated or not. Enabled You can decide if the menu item must respond to events, or should be dimmed if you want it to be unavailable. Visible You can make visible element in the menu. Window List Assess whether the control menu contains a list of MDI daughter leaves open in an application MDI. . / images / flechd.gif Right Arrow Move the selected menu one level down when you click on it. You can create up to four levels of submenus. . / images / flechg.gif Left Arrow Move the selected menu one level up when you click on it. You can create up to four levels of submenus. . / images / flecheh.gif
Arrow High Move the menu item selected from a position up inside the same level menu whenever you click on it. . / images / flechb.gif Down arrow Move the menu item selected from a position down inside of the same menu level whenever you click on it. Zone menu list Zone list, which displays a hierarchical list of menu items. The elements of sub-menus are indentes to indicate their position or seniority. Next Move selection to the next line. Insert Insert a line in the list, above the line currently selected. Remove Remove the line currently selected. OK Closes the Creator of menus and applies all changes to the last sheet selected. The menu is available at the time of creation, but the fact of selecting a menu to the creation opens the window code for the event Click on this menu, without executing any code of event. Cancel Closes the Creator of menus and cancels all changes. III. Learn to make menu bars in our interface. Let the "Focus" on our worksheet by selecting it simply, the title bar is displayed with the blue color that you know well. Click on the menu bar VB on the label "window" and then on the label "Creating menus." Or, In the toolbar at the interface of VB, ,click on the icon representing a file the third from the left. (It is necessary that a sheet is displayed) You see the creator menu.  The creation window menu opens. * 1st label - the label entitled 'File' (Etiquette Parent) o In the property "Caption" o Write: [& File] (without []) and then press Tab (Tab) on your keyboard o your cursor is positioned in the fields "Name" o Write: [mnu_Fichier], in the property "Name", press Tab (button keyboard) 1st label - the label 'print' (Etiquette Girl) o Press the button "Next" to open a new window seizure. o Write: [& Print] in the property "Caption" press Tab, then o Write: [mnu_Print], in the property "Name", press Tab, o then click the right arrow button to create a label girl who will be housed at the label (Parent) entitled "File" 2nd label - the label entitled 'Run' (Etiquette Girl) o Press the button "Next" to open a new window seizure. o Write: [& Run] in the property "Caption" press the Tab then, o Write: [mnu_Execut in property "Name", press Tab o If the four small dots before the command & Run are not represented then click the right arrow button to create a label girl who will be housed at the label (Parent) entitled "File" otherwise Insert a line of separation (Etiquette Girl) o Press the button "Next" to open a new window seizure. (4 small points are automatically) o Write: [-] (dash separation located on the "6" on your keyboard) in the property "Caption" press "Tab" o Write: [mnu_Sep1 in property "Name", press Tab 3rd label - the label entitled 'Exit' (Etiquette Girl) o Press the button "Next" to open a new window seizure. o Write: [& Exit] in the property "Caption" press the Tab then, o Write: [mnu_Quitter in property "Name", press Tab 2nd label - the label '? " (Etiquette Parent) o Press the button "Next" to open a new window seizure. o Write: [?] in the property "Caption" press the Tab then, o Write: [mnu_About_Titre in property "Name", press Tab (Observe that before the "?" We do not have the small 4 points (label Parent) 1st label - the label entitled "About ..." (Etiquette Girl) o Press the button "Next" to open a new window seizure. o Write: [& About ...] in the property "Caption" press the Tab then, o Write: [mnu_About in property "Name", press Tab then click the right arrow button to create a label girl who will be housed at the label (Parent) * Press the "OK" button, check your work and save on .. You wrote your first "menu bar"
|