Solved

Word-style menus

Posted on 2000-03-01
7
131 Views
Last Modified: 2010-04-04
Hello

I would like to know the best way to create the new Word style menus. I refer to the ones that have toolbars with buttons containing menu captions. When the menu caption is pressed, a popup menu appears below it with the menu items. When you scroll your mouse across the other options, the popups all appear below.

I ask this question because I want to ensure that there is not a control requiring a few distinct property settings to accomplish this behaviour, before I write my own component to do this.

Cheers,
Edo
0
Comment
Question by:Edo082297
  • 3
  • 3
7 Comments
 
LVL 10

Expert Comment

by:Lischke
ID: 2572082
Hi Edo,

fortunately there's already all in Delphi you need for this kind of menu (it is actually the same as the IDE uses, right?). The only thing you won't get is the menu animation, but all other is easy:

1) place a TMainMenu on the form and fill it with items
2) place a toolbar on the same form and create a few buttons
3) select each button and set its MenuItem property to an item of your choice
4) mark each item as grouped to allow for automatic open and close of the submenus when moving the mouse over different main items


Ciao, Mike
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2574194
Listening
0
 
LVL 1

Author Comment

by:Edo082297
ID: 2591277
Hi Mike

Thanks. Do you have any suggestions as to how I could now make the buttons flat (TSpeedButton)? Will I have to write my own TToolButton?

Post as answer, you have met the requirements.

Cheers,
Edo
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
LVL 10

Accepted Solution

by:
Lischke earned 50 total points
ID: 2591296
Hi Edo,

use property TToolbar.Flat to make flat buttons.

Ciao, Mike
0
 
LVL 1

Author Comment

by:Edo082297
ID: 2591318
I just found it, one just has to set the Flat property to true of the containing toolbar.

I'm not terribly happy with the all or nothing sizes of the buttons, however. Anyway, it's a pretty moot point.

Cheers,
Edo
0
 
LVL 1

Author Comment

by:Edo082297
ID: 2591321
Ha-ha, our answers crossed.
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2591341
:-)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 74
delphi exception 7 68
can't find the executable in Simulator 1 101
Find and Replace Stream with 0s 8 69
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question