Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Draw on Main menu

Posted on 2001-07-25
7
Medium Priority
?
256 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

704 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