您如何在Delphi XE3中的Firemonkey FM2应用程序中创建非客户端区域 [英] How do you style the non-client area in a Firemonkey FM2 application in Delphi XE3

查看:218
本文介绍了您如何在Delphi XE3中的Firemonkey FM2应用程序中创建非客户端区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在Delphi XE2的时间段内提出了这个问题,那么答案就是一个很好的

I previously asked this question in the Delphi XE2 timeframe, and the answer then was a pretty ugly hack.

现在,Delphi XE3支持非客户端根据正式发布说明。您如何在Firemonkey FM2中的Delphi XE3中执行此操作?

Now Delphi XE3 supports non-client theming, according to the official release notes. How do you do it in Delphi XE3 in Firemonkey FM2?

我相信它必须与样式书有关,但我无法理解。表单本身有一个EnableBorderStyling属性,我设置为true,我想我必须加载一个包含一些非客户主题数据的样式,但是找不到包含它的样式。

I believe it must be something to do with the style-book, but I can't figure it out. The form itself has an "EnableBorderStyling" property which I set to true, and I am thinking I must have to load a style that contains some nonclient theme data, but I can't find a style that includes it.

这个帮助没有关于这个问题。

The help has nothing about this subject.

Update2 好的,没有坏了,只是我没有一个包含这个样式元素的样式(如RRUZ所说)。

Update2 Okay, it's not broken, it's just that I don't have a style that contains this style element (as RRUZ says).

procedure TForm1.FormShow(Sender: TObject);
begin
  StyleBook := StyleBook1;
  WindowBorder.UpdateStyle;
end;

Update3 :样式文件似乎位于两个不同的位置,混淆:

Update3: Style files appear to be in two different locations, which is confusing:

  C:\Program Files (x86)\Embarcadero\RAD Studio\10.0\Redist\styles\Fmx        
  C:\Users\Public\Documents\RAD Studio\10.0\Styles

请注意,我没有一个Luna.Style(firemonkey风格)在任何一个位置,但5秒与样式编辑器工具。 (打开,另存为,并将类型更改为.Style,我有一个!)

Note that I don't have a Luna.Style (firemonkey style) in either spot, however 5 seconds with the Style Editor tool. (Open, and Save as, and change type to .Style, and I had one!)

Update4 :RRUZ的回答有效,但是我的系统(Windows 8 RTM)的非客户端样式看起来不正确,他们在
的区域周围有白色的角落没有完全绘制。调整窗口大小使其消失,我确定我应该能够强制WM_NCREPAINT或某些东西,并使其消失。

Update4: RRUZ's answer works, but on my system (Windows 8 RTM) the non-client styles don't look right, they have white corners around the areas of the on't fully paint . Resizing the window makes it go away, and I'm pretety sure I should be able to force a WM_NCREPAINT or something, and make it go away.

推荐答案

要调整Firemonkey应用程序的非客户区域,所选样式必须具有定义的 windowborderstyle 元素(如图所示)

To Style the non client area of a Firemonkey application the selected style must have a windowborderstyle element defined (as is show in the picture)

从delphi中包含的样式,尝试 Luna.Style

From the styles included with delphi try the Luna.Style

这篇关于您如何在Delphi XE3中的Firemonkey FM2应用程序中创建非客户端区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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