GetPropInfo Font Size
设置font size,遍历所有控件,有的控件没有font属性,所以要用GetPropInfo判断
if (GetPropInfo(cmp, "font"))
function GetObjectProperty(
const AObject : TObject;
const APropName : string
):TObject;
var
PropInfo:PPropInfo;
begin
Result := nil;
PropInfo:=GetPropInfo(AObject.ClassInfo,APropName);
if Assigned(PropInfo) and
(PropInfo^.PropType^.Kind = tkClass) then
Result := GetObjectProp(AObject,PropInfo);
end;
function SetIntegerPropertyIfExists(
const AObject : TObject;
const APropName : string;
const AValue : integer
):Boolean;
var
PropInfo:PPropInfo;
begin
PropInfo:=GetPropInfo(AObject.ClassInfo,APropName);
if Assigned(PropInfo) and
(PropInfo^.PropType^.Kind = tkInteger) then
begin
SetOrdProp(AObject,PropInfo,AValue);
Result:=True;
end else
Result:=False;
end;
//调用
procedure TFrmTest.FormCreate(Sender: TObject);
var
objTemp : TObject;
begin
objTemp := GetObjectProperty(Self,'Font');
if Assigned(objTemp) then
SetIntegerPropertyIfExists(objTemp,'Size',9);
end;
GetPropInfo Font Size的更多相关文章
- XE6 c++builder 设置 font size GetPropInfo SetOrdProp
PPropInfo ppi; PTypeInfo pti; TTypeKinds ttk; TRttiContext context; TRttiType *rttiType TObject* obj ...
- hiho #1288 微软2016.4校招笔试题 Font Size
#1288 : Font Size 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Steven loves reading book on his phone. The ...
- LaTeX :font size 修改字体大小的几种方式
调整字体大小的几种方式,大小依次增大,具体如下: \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \hu ...
- unity UGUI text font size对性能影响较大
Font Size对ugui text的性能影响非常大. <Cube Duck Run>在itouch5上测试是很流畅的,但是在iphone5上测试,在game over后显示历史最高分时 ...
- UIAlertController custom font, size, color
本文转载至 http://stackoverflow.com/questions/26460706/uialertcontroller-custom-font-size-color up vote2d ...
- Phone Font Size
This table lists and describes the various font sizes that can be applied. Attribute = FontSize Na ...
- PyCharm Change Font Size
file->settings->colors&fonts-> save as (save the current scheme as your own)-> font- ...
- 【hihoCoder】1288 : Font Size
题目:http://hihocoder.com/problemset/problem/1288 手机屏幕大小为 W(宽) * H(长),一篇文章有N段,每段有ai个字,要求使得该文章占用的页数不超过P ...
- LaTex Font Size 字体大小命令
LaTex中字体大小有很多中等级,分别由下列命令控制: \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE ...
随机推荐
- jsfl读取xml,图片,并生成swf
var newdoc = fl.createDocument(); var doc = fl.getDocumentDOM(); var URI = fl.browseForFolderURL(&qu ...
- zmediaboard-Hi3518参数及配置
1.12_13.uboot的烧写和flash分区1_21.12.1.裸机烧录uboot(1)什么叫裸机烧录?设备是空白的,未经烧录的,就叫裸机.(2)裸机烧录一个设备有2种方案:1是用外部烧录器来烧录 ...
- 标 题: 有什么办法快速把pc上的网址发送到手机上
标 题: 有什么办法快速把pc上的网址发送到手机上 transfer2u, pushbullet都可以实现你说的功能,还可以把图片或者选中内容/剪贴板内容发送到手机.后者功能更强,还支持在电脑之间发 ...
- 【转】每天一个linux命令(6):rmdir 命令
原文网址:http://www.cnblogs.com/peida/archive/2012/10/27/2742076.html 今天学习一下linux中命令: rmdir命令.rmdir是常用的命 ...
- java 物理资源回收 finally与try
java垃圾回收机制不会回收任何物理资源(磁盘文件.数据库连接.网络连接),垃圾回收机制只能回收堆内存中对象所占用的内存. 方法一使用finally块,在finally块中写入资源回收代码,如下: p ...
- Go随机数的使用
随机数使用比较广泛,例如,抽奖.均衡等等. 下面简单说明其使用方法. Example1 package main import ( "log" "math/rand&qu ...
- 【jmeter】jmeter聚合报告之90%Line参数说明
其实要说明这个参数的含义非常简单,可能你早就知道他的含义,但我对这个参数一直有误解,而且还一直以为是“真理”,原于一次面试,被问到了这个问题,所以引起我这个参数的重新认识. 先说说我错误的认识: 我一 ...
- ASP.NET中将数据作为XML数据发送 使用 Request.InputStream 接收
将数据作为XML数据发送,例如:public void PostXml(string url, string xml){byte[] bytes = Encoding.UTF8.GetBytes(xm ...
- 用C#实现C/S模式下软件自动在线升级
用C#实现C/S模式下软件自动在线升级 1 前言 长期以来,广大程序员为到底是使用Client/Server,还是使用Browser/Server结构争论不休,在这些争论当中,C/S结构的程序可维护性 ...
- jquery.validate.js remote (php)
网上的人不厚道呀 validate 这玩意的异步是 返回的 echo 'true' 或者 echo 'false';很少有人说呀~.~ 转载了一篇原文: jquery.validate.js对于数 ...