Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

"multilevel" menus

How to make "multilevel" menus
(like in Delphi IDE, when you click File/Reopen menu)?
0
bor061297
Asked:
bor061297
  • 2
1 Solution
 
rwilson032697Commented:
When designing the menu in the TMainMenu compoentn editor press Ctrl-Right Arrow to create a sub menu descending from a menu item

Cheers,

Raymond.
0
 
rwilson032697Commented:
Or...

If you want to create it dynamically, set the parent of the new menu item to be the menu item you want it to be a sub menu of.

eg: MyMenuItem := TMenuItem.Create(Self); // Where self = the form
     MySubMenuItem.Insert(MyMenuItem, Index); // Where index is where in the menu you want it to appear

You also need to set the OnClick event etc for the new menu item...

Cheers,

Raymond.
0
 
bryan7Commented:
when you are creating the menu, Right click on it with the mouse
and click on "Create Sub-menu"

bryan

0
 
duke_nCommented:
or something like that:
Tmenuitem.add(MI:tmenuitem);
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now