delphi Firemonkey ListBoxItem自绘
delphi Firemonkey ListBoxItem自绘
ListBoxItem1的事件ListBoxItem1Paint
procedure TForm1.ListBoxItem1Paint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);
begin
if (Sender as TListBoxItem).IsSelected then
begin
Canvas.Fill.Kind := TBrushKind.Solid;
Canvas.Fill.Color := TAlphaColorRec.Blue;
Canvas.FillRect(ARect, , , [], ); Canvas.Fill.Kind := TBrushKind.Solid;
Canvas.Fill.Color := TAlphaColorRec.White;
Canvas.FillText(ARect, (Sender as TListBoxItem).Text, False, , [], TTextAlign.Leading, TTextAlign.Center);
end
else
begin
Canvas.Fill.Kind := TBrushKind.Solid;
Canvas.Fill.Color := TAlphaColorRec.White;
Canvas.FillRect(ARect, , , [], ); Canvas.Fill.Color := TAlphaColorRec.Black;
Canvas.Fill.Kind := TBrushKind.Solid;
Canvas.FillText(ARect, (Sender as TListBoxItem).Text, False, , [], TTextAlign.Leading, TTextAlign.Center);
end;
end;
delphi Firemonkey ListBoxItem自绘的更多相关文章
- Firemonkey ListBoxItem自绘
ListBoxItem1的事件ListBoxItem1Paint procedure TForm1.ListBoxItem1Paint(Sender: TObject; Canvas: TCanvas ...
- delphi Firemonkey ListView 使用参考
delphi Firemonkey ListView 使用参考 Tokyo版本 http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Customizin ...
- Delphi Firemonkey Button ImageList
Delphi Firemonkey Button ImageList 按钮图标 在上面 界面上,选择Button,放个ImageList控件,添加图标到ImageList. 然后关联Button和Im ...
- Color gradient in Delphi FireMonkey
Introduction to color gradients in Delphi FireMonkey. Video This video covers the basics of color gr ...
- Z Order of Controls in Delphi FireMonkey(Tom Yu的博客)
Get and set the Z Order of controls at runtime in Delphi FireMonkey. This is a follow on to my earli ...
- delphi DBGrid简单自绘(字体颜色、背景等)
delphi DBGrid简单自绘(字体颜色.背景等) 从网上找的代码 应该是C#写的,其实delphi 的操作类似: 1 2 3 4 5 6 7 8 9 10 11 12 13 void __fa ...
- Delphi FireMonkey使用UniDAC 连接MySQL
首次用Delphi XE6 开发安卓程序,并没有在网上找到连接远程MySQL服务器的文档,自己摸索一番,发现UniDAC控件新版本也已支持了FireMonkey下的开发.遂记下连接方法和大家分享. 1 ...
- Delphi Firemonkey在主线程 异步调用函数(延迟调用)
先看下面的FMX.Layouts.pas中一段代码 procedure TCustomScrollBox.MouseDown(Button: TMouseButton; Shift: TShiftSt ...
- Delphi:解决重绘造成的窗体闪烁问题
解决窗体闪烁问题 具体代码: 1.在声明窗体类时加入: private procedure CreateParams(var Params: TCreateParams); overrid ...
随机推荐
- 保存csv时, 不保留index
pd.to_csv('your.csv', index=False)
- centos7虚拟机安装出现license information
问题:vm 10下安装CentOs7后无法启动.出现一个license information页面 解决办法:出现license information,即说明需要同意许可信息,输入1-回车-2-回车 ...
- bzoj 4566 [Haoi2016]找相同字符——广义后缀自动机
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4566 每个后缀结尾处 ct[ ] = 1 ,按拓扑序 dp 一下就能求出 right 集合的 ...
- hadoop家族学习路线图之hadoop产品大全
大数据这个词也许几年前你听着还会觉得陌生,但我相信你现在听到hadoop这个词的时候你应该都会觉得“熟悉”!越来越发现身边从事hadoop开发或者是正在学习hadoop的人变多了.作为一个hadoop ...
- linux上通过lighttpd上跑一个C语言的CGI小页面以及所遇到的坑
Common Gateway Interface如雷贯耳,遗憾的是一直以来都没玩过CGI,今天尝试一把.Tomcat可以是玩CGI的,但得改下配置.为了方便,直接使用一款更轻量级的web服务器ligh ...
- 【shell】awk命令
简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再 ...
- JAVA架构师面试题 一
基础题目 Java线程的状态 进程和线程的区别,进程间如何通讯,线程间如何通讯 HashMap的数据结构是什么?如何实现的.和HashTable,ConcurrentHashMap的区别 Cookie ...
- linux svn服务器(一)
先安装 参考文章http://www.cnblogs.com/zhaoyang-1989/articles/3455481.html
- java 中的好东西 jackson
转自: https://github.com/FasterXML/jackson 重要的是: jackson 支持 第三方数据类型 jsonobject jsonarray( json.org/jav ...
- bzoj4693: 雪中送温暖
Description 每年的1月10日是温暖节,在这一天,化身出题人的C_SUNSHINE将会给OIer们送温暖.OIer们只要在门口放上一个 仙人掌,就能在早上的某个时刻听到门外传来一声:“开门, ...