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 ...
随机推荐
- LG3369 【模板】普通平衡树
题意 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 插入x数 删除x数(若有多个相同的数,因只删除一个) 查询x数的排名(排名定义为比当前数小的数的个数+1.若有多个相 ...
- 时间操作(JavaScript版)—年月日三级联动(默认显示系统时间)
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/wangshuxuncom/article/details/35263317 这个功能 ...
- Python之包管理工具:distutils、setuptools、distribute、setup.py、easy_install、easy_install、pip
在安装Python包的过程中,经常涉及到distutils.setuptools.distribute.setup.py.easy_install.easy_install和pip等等. 介绍:htt ...
- Qt treewidget样式的自定义(转)
这个treewidget样式真是写得让人心碎,主因是那个天杀的表头,真是块古里古怪的硬骨头,令人抓狂,一直找不到给表头设定背景图的方法,让我一度决定弃用tree. 后来表头的属性找到了,下拉条又找不到 ...
- POJ1742Coins
题目:http://poj.org/problem?id=1742 可以正常地多重背包.但是看了<算法竞赛入门经典>,收获了贪心的好方法. 因为这里只需知道是否可行,不需更新出最优值之类的 ...
- Mac 平台安装 Android Studio 集成 Android SDK
最近写个小工具,给周边一些朋友用用(类似任务执行),一开始 任务执行用Python写的,部署在云端,有一些局限(资金开销):现准备写一个任务端,需要用到的人直接装个客户端就行,于是准备写个客户端版本的 ...
- TX Textcontrol 使用总结一模板
以下内容纯属个人使用感想,如有问题,还望讲解!!! 简介与使用感想: TX Text Control是一套功能丰富的文字处理控件,它以可重复使用控件的形式为开发人员提供了Word中常用的文字处理功能, ...
- bzoj4153 [Ipsc2015]Familiar Couples
Description 有n对夫妇,一开始夫妇之间互不认识,若两男或两女成为朋友,称他们为"熟人","熟人"关系具有传递性,即若a熟b且b熟c则a熟c.若两组夫 ...
- VMware全屏时, 隐藏上方工具栏横条
VMware全屏时, 隐藏上方横条 菜单栏打开 编辑 选择 首选项 找到 显示 取消勾选 在全屏时取消固定时显示工具栏边缘
- css调用方式的方法
1.内部样式表(位于 <head> 标签内部) <html><style>.box{display:inline}p { color: rgb(255,0,0); ...