Do not use any third-party controls in Delphi7, implement the dragable XP style menu on the toolbar.

zhaozj2021-02-16  105

Step 1: Add the CoolBar component on the Win32 panel to the form

Step 2: Add the ActionMainMenuBar component on the Additional panel to the Coolbar component. (Note must be placed on the COOBAR component)

Step 3: Add the PageScroller components on the Win32 panel to the Coolbar component.

Step 4: Add the ActionToolBar component on the Additional panel to your PageScrooler component (note) on PageScroolerh)

Step 5: Add the ActionManager component on the Additional panel to the form

Step 6: Set the AutoSize property of the Coolbar component to True

Step 7: Select the ActionManager component, double-click its ActionBars property, add two TActionBarItem in the pop-up EDITING ActionManager1.Actionbars box, select the first TActionBarItem, double-click its Items property, add two ActionClientItem in the pop-up box, Set the two ActionClientItem's CAPTION attributes, "Edit", and then add ActionClientItem in the items attribute in ActionClientItem, and set their CAPTION to "New", "Open". If you want In the newly created submenu, then add ActionClientItem again, set the CAPTION content. Select the second TActionBarItem, follow the methods mentioned above, also add ActionClientItem, and set the CAPTION property.

Step 8: Select the first TACTIONBarItem, set its ActionBar property to ActionMainMenubar, select the second TACTIONBarItem, set its ActionBar property to antil.

Step Nine: Run the program, I believe that you have seen the effect shown in the figure. It is caused by many attributes, readers go to the analysis.

转载请注明原文地址:https://www.9cbs.com/read-14211.html

New Post(0)