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 ...
随机推荐
- ppt罗列项排版
关于罗列项的排版(1,....2,......3,......4,........)
- M端计算rem方法
(function(){var a=document.documentElement.clientWidth||document.body.clientWidth;if(a>460){a=460 ...
- S5PV210 移植无线wifi网卡 MT7601
一.准备工作 1.MT7601驱动下载 点击下载 2.插入usb WiFi 启动开发板linux,lsusb查看usb驱动 Bus 001 Device 003: ID 148f:7601看到的是该驱 ...
- jsp渲染
SP与Servlet什么关系?JSP和ASP什么关系?下面我们一一来探讨. 第一个.jsp文件:<html> <head> <title> ...
- 在启动Windows Process Activation Service时,出现错误13:数据无效
在启动Windows Process Activation Service时,出现错误13:数据无效 1.错误原因: 当Windows Process Activation Service从C:\Wi ...
- Git断点续传和离线增量更新的实现
cnblogs官方支持Markdown写博客了,亲测一下. ____ 什么是Bundle文件 Bundle文件是在packfile文件的基础上增加了代码库的元信息.通俗的说bundle文件就是一个便携 ...
- bzoj3871: [Neerc2013 C]Cactus Automorphisms || 3899: 仙人掌树的同构
Description 给定一个N,N<=50 000个节点的仙人掌,其是指每条边最多在一个环中的无向图,求仙人掌有多少种自同构.自同构是指得是图的顶点集合V到V的变换M, 以P1^a1*P2^ ...
- Redis:Redis
ylbtech-Redis:Redis 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 7.返回顶部 8.返回顶部 9.返回顶部 ...
- java并发编程 Executor,Executors,ExecutorService,CompletionService,Future,C
使用CompletionService获取多线程返回值 CompletionService和ExecutorCompletionService详解 Java并发编程系列之十五:Executor框架
- python unittest单元测试框架-1
Test Case.Test Suite.Test Runner.Test Fixture Test Case:单个测试用例 Test Suite:测试组合.可以把多个测试用例集合在一起执行. Tes ...