Chapter One introduction of-delphi (Iv.) (4)

Source: Internet
Author: User

1.4.1.1 into Menu Designer menus Designer

When you create a menu, you first place a menu object in the form. The Menu Designer is then tuned into the menus for detailed settings. There are two ways to get into menu Designer: Select the menu widget, click the items omitted button in the Move property, or double-click the button on the menu widget to appear menu Designer.

1.4.1.2 Create menus for each item

When you enter menu Designer, you will see a highlight on the first position of the menus. Enter the top-level menu item (which is actually setting the Caption property of the top level item) and return. When a menu bar is set, the highlighted position is moved to the next item in the Drop-down menu, and a dashed box appears at the top of the main menu indicating the position of the next top-level item. To include an isolation bar, you can type a short stroke "-" that is, a minus sign and a carriage return. Gradually enter the menu items, with the left mouse button to switch to the next top-level menu, until the menu is complete.

1.4.1.3 set accelerator keys and hotkeys

You can set the accelerator key, as in the previous routine, simply put "&" in front of the letter you want to specify as the accelerator key when you enter it, and the letter will be underlined and, when run, press ALT + Accelerator letter to activate the menu bar. Setting a hotkey is also convenient, just select a hotkey combination in the Drop-down menu of the Shortcut property Value section of the menu bar in Object Inspector. At run time, the menu bar is activated by CTRL + Key letter. Accelerators and hot keys are not contradictory, and you can specify them at the same time.

1.4.1.4 using the Menu Designer pop-up menu

Menu Designer also has a pop-up menu that provides a high frequency menu Creation command and enables quick access to template options. Right-click in the Menu Designer window or stop the cursor on the menu designer and press ALT-F10 to bring up menu Designer pop-up menus. The Menu Designer pop-up menu allows you to add menu items, delete items, and more, and add, delete, insert, and so on to the standard main Menu template.

For the menu programming function, you can double-click the menu bar, or on the events page of a particular menu bar, double-click the value segment of the event that it responds to, and Delphi will go back to the Code Editor, where the cursor stops in the event handler for the events, and you can set the code that implements the task for the

If you have an event-handling process for the accelerator button on speed bar, and you need to connect the corresponding menu item to the event-handling process, simply enter the name of the event-handling procedure after the OnClick event on the events page of the menu item. The same function is achieved by clicking the menu item and pressing the accelerator button.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.