1

The Problem I am working with a form where the aero glass border is extended from the top around 80 pixels. TMainMenu doesnt support custom positioning out of the box and I only assume it might be possible via owner draw. Drawn on a form in the default position even with double buffered to true the text does not show properly in any version of delphi (07, 09 here tested on 10 XE by friends).

What I really want is for the menu to be transparent with black text, and if possible in a lower and to the right custom position.

I have no issue using flat speed buttons and popup menu's to simulate the effect as it works well. I have to calculate the width of the text so that language translations set the width of the buttons appropriately. So I was just trying to see if there was an alternative.

What I know and have turned up Not a whole lot to be honest. Seen some API calls for making the brush transparent, which works for other tasks but not this it seems.

I have looked at some custom drawn items in VB Pascal and C# but still have not seen what I am looking for. If anyone can point me in the right direction I would appreciate it greatly. So far all I have managed todo is draw the menu without its 3d gradient.

SuicideClutchX2
  • 87
  • 2
  • 11

1 Answers1

2

I do not believe this is possible, using TMainMenu. I believe that you could easily do this however by using a form-per-drop-down menu, making it a sheet of glass, and simulating one of the menus in a TMainMenu with each glass form

Warren P
  • 65,725
  • 40
  • 181
  • 316
  • Not 100% sure what you mean but it pretty much sounds like what I was gonna do using the flat speed buttons and popupmenus. I will wait to see if anyone else has input before i select an answer. – SuicideClutchX2 Jan 19 '11 at 22:53
  • Windows creates menus itself, and can draw them itself. Your ability to override that in Owner-Draw menu item mode includes the option to draw your own bitmap or text, is strictly limited by the decision to use Windows own menu APIs. By avoiding them completely you give yourself full control. Clear? – Warren P Jan 31 '11 at 19:36