Solved

Docking

Posted on 1998-10-28
4
185 Views
Last Modified: 2010-04-06
How does one go about creating dockable menus like the one in the Delphi 4 IDE using components shipped with Delphi 4?
0
Comment
Question by:philipleighs
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
BoRiS earned 50 total points
ID: 1344879
philipleighs

Drop a controlbar on your form(from the addtional palette) then drop a toolbar(from your win32 palette) on to that.  Right click on the toolbar and choose add button.

Know drop a main menu component on you form add a File heading with a few items, then click on your button you created give the caption the same name as the File heading eg. &File, now set the menu property Automerge to true.

Then on the button look for the property MenuItem, drop down the list and choose File1.  Then on the toolbar look for the property Flat set it to true, Finally on the toolbar look for the property ShowCaptions set this to true aswell...

Then compile and there you have it the way borland did it...

Later
BoRiS
0
 
LVL 3

Author Comment

by:philipleighs
ID: 1344880
Hi BoRiS,

The menu does not act completely like D4.

Once a menu is dropped down (say the File menu), moving the mouse over the Edit menu does not open the Edit menu and close the File menu.

Also when the file menu is open, pressing the right cursor key does not open the Edit menu.

Maybe these two issues require minor tweaks so I'll accept your answer if you add a comment with a workaround, otherwise I'll reopen the question.

Cheers,
Phil.

0
 
LVL 4

Expert Comment

by:BoRiS
ID: 1344881
philipleighs

Sorry I should have included this in the explanation, all you need to do is set the grouped property to true on all the buttons, this way they act exactly as a main menu...

What the grouped property does is allow only 1 button at a time to be selected...

Later
BoRiS
0
 
LVL 3

Author Comment

by:philipleighs
ID: 1344882
Thanks BoRiS.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

760 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now