Solved

Draw on Main menu

Posted on 2001-07-25
7
249 Views
Last Modified: 2010-04-06
Hi
Could somebody tell is it possible to draw on the main menu. I have an Image component on the main form and I'd like to draw (copy) the picture in the Image to the right side on the main menu.
0
Comment
Question by:vterekh
7 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6316454
yes, it may possible,
depending what delphi version you use,

could you tell us this?
0
 
LVL 1

Author Comment

by:vterekh
ID: 6316459
Of course
I use Delphi 6.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 6316497
well, i must guess now,
no delphi on hand and no d6 available to me

there should be a ownerdraw-property, if so, set it to true
then there should be events OnDrawItem or OnDrawItemImage, which are providing a canvas and a rect, to which you can copy your image.

this is just from head and i may wrong, maybe this property/event must be adjusted to the menu-component, where the menuitem is assigned to

meikl ;-)
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6316514
0
 
LVL 1

Author Comment

by:vterekh
ID: 6317150
There's a problem with OwnerDraw property. When it's TRUE and ShortCut was chosen for some menu item then menuitem's caption laps partly the ShortCut name.
0
 
LVL 21

Expert Comment

by:gemarti
ID: 6317453
Let me give this a try...

Create a new form
Add A MainMenu component
Add some menu items.
Select a bitmap for the MainMenu properties
Add an imagelist and add some images to the list
Now select imageindex in the main menu properties and select an image for each subindex item on the main menu.


0
 
LVL 1

Author Comment

by:vterekh
ID: 6322097
2 gemarti:
I wanted to draw not in the area of MenuItem
For example the menu width equal the width of the window it belongs. As usual the last menu item (i mean main menu item, not popup items) don't reach the right size of menu bar. I'd like to draw on the empty part of menu bar.

Nevertheless I've solved this problem using some kretzschmar's ideas. The example suggested by mnasman discribe the same way, but kretzschmar was the first :)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

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…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 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