所有者在航空玻璃表格上绘制TMainMenu? [英] Owner Drawing TMainMenu over Aero Glass Form?

查看:238
本文介绍了所有者在航空玻璃表格上绘制TMainMenu?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题
我正在使用一个窗体,其中航空玻璃边框从顶部延伸大约80个像素。 TMainMenu不支持自定义定位开箱即用,我只认为可能通过所有者绘制。在默认位置绘制,即使双缓冲为true,文本在任何版本的delphi(07,09这里在10 XE由朋友测试)中都没有正确显示。

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).

我真正想要的是让菜单透明黑色文本,如果可能的话,可以在较低的和正确的自定义位置。

我没有使用平面速度按钮和弹出菜单来模拟效果,因为它的工作原理。我必须计算文本的宽度,以便语言翻译适当地设置按钮的宽度。所以我只是试图看看是否有另一种选择。

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.

我知道和已经出现
不是很多老实说。看到一些API调用,使画笔透明,这适用于其他任务,但不是这样看来。

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.

我已经看过VB Pascal和C#中的一些自定义绘制项目还没有看到我在找什么。如果有人能指出我正确的方向,我会非常感激。到目前为止,我所有的管理工作都是绘制菜单而没有它的3d渐变。

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.

推荐答案

我不相信这是可能的,使用TMainMenu。我相信你可以很容易地做到这一点,但是使用一个下拉式菜单,使它成为一张玻璃板,并用每个玻璃窗口模拟TMainMenu中的一个菜单

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

这篇关于所有者在航空玻璃表格上绘制TMainMenu?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆