Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Draw on Main menu

Posted on 2001-07-25
7
Medium Priority
?
257 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 200 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

916 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