Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top