http://stackoverflow.com/questions/28893564/memory-leak-on-tstringgrids-ondrawcolumncell-event

http://stackoverflow.com/questions/26824307/how-to-display-a-multiline-text-in-a-stringgrid-cell-delphi-xe6-android

http://stackoverflow.com/questions/25410901/firemonkey-xe5-livebinding-tgrid-cell-text-aligment

http://cc.embarcadero.com/Item/28894

ColumnHeader

procedure TFrm.GridLDrawColumnHeader(Sender: TObject;
const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF);
begin
Canvas.Fill.Color := TAlphaColorRec.Lightskyblue;
Canvas.FillRect(Bounds, , , [], );
Canvas.Fill.Color := TAlphaColorRec.White;
// Canvas.te//设置字体
Canvas.FillText(Bounds, Column.Header, False, , [], TTextAlign.Center, TTextAlign.Center);
end;

DrawColumnCell

取Grid任意行任意列的值或者是可见区域的单元格值,未验证。

Grid1.Model.GetValue(col,row);

LeftColumn
RigthColumn

TopRow
BottomRow

Specifies the index of the first visible scrollable row in the grid.

Read TopRow to determine the index of the first row in the scrollable region that is visible. Set TopRow to scroll the rows in the grid so that the row with the TopRow index is the first row after the fixed rows.

head:THeader;
  LContent:TControl;

head:=Grid1.FindStyleResource('header') as THeader;

Grid1.FindStyleResource<THeader>(StrHeader, FHeader)

Grid1.FindStyleResource<TControl>('header', LContent)

获取grid操作系统默认选择行颜色值。focus是选择单元格的值,selection是选中行的值。

self.Rectangle1.Fill.Color:= ((self.Grid1.FindStyleResource('focus') as TControl) as TRectangle) .Fill.Color;
self.Rectangle1.Fill.Color:= ((self.Grid1.FindStyleResource('selection') as TControl) as TRectangle) .Fill.Color;

一次转换就可以。

self.Rectangle1.Fill.Color := (self.Grid1.FindStyleResource('focus') as TRectangle).Fill.Color;
 self.Rectangle1.Fill.Color := (self.Grid1.FindStyleResource('selection') as TRectangle).Fill.Color;

FMX.Grid.Style文件里定义了这2种初始化的地方,如下:

FindStyleResource<TControl>(StrFocus, FFocus)
FindStyleResource<TControl>(StrSelection, FSelection)
 
画当前行和当前单元格,TOpenControl(FSelectionClone).PaintInternal;TControl.PaintInternal;  最终调用了FMX.Objects里的TShape.Painting

firemonkey Grid自定义的更多相关文章

  1. Yii框架zii.widgets.grid自定义按钮,ajax触发事件并提示

    相关类手册: http://www.yiichina.com/api/CButtonColumn   buttons 属性 public array $buttons; the configurati ...

  2. fineui grid自定义选项框 带全选

    为什么要写这功能? 1 当你用可编辑列的时候,是不能用选择框的,这是ext设定的. 2 如果有不允许选择行,默认的选择框是没有这个功能的.   参考: 遍历asp.net控件 http://fineu ...

  3. Custom Grid Columns - FireMonkey Guide

    原文 http://monkeystyler.com/guide/Custom-Grid-Columns ack to FireMonkey Topics As we saw in TGrid a F ...

  4. 纸壳CMS列表Grid的配置

    纸壳CMS(ZKEACMS)里的Grid是一个TagHelper,是对jQuery插件datatables的一个配置封装. Easy.Mvc.TagHelpers.GridTagHelper grid ...

  5. 【基于WPF+OneNote+Oracle的中文图片识别系统阶段总结】之篇一:WPF常用知识以及本项目设计总结

    篇一:WPF常用知识以及本项目设计总结:http://www.cnblogs.com/baiboy/p/wpf.html 篇二:基于OneNote难点突破和批量识别:http://www.cnblog ...

  6. [深入浅出Windows 10]应用实战:Bing在线壁纸

    本章介绍一个使用Bing搜索引擎背景图接口实现的一个应用——Bing在线壁纸,讲解如何使用网络的接口来实现一个壁纸下载,壁纸列表展示和网络请求封装的内容.通过该例子我们可以学习到如何使用网络编程的知识 ...

  7. yii项目开发项目常用技巧和方法汇总

    1.使用CActiveForm类组件如何输出不带html属性的结果 eg:<?php echo $form->textField($model,'email',array('size'=& ...

  8. DevExpress WPF入门指南:加载动画的应用

    LoadingDecorator是一个容器控件用于显示 long-loading 的内容.内容还没加载完成的时候会显示一个加载指示器,加载完成后指示器消失,如下图所示: 开启LoadingDecora ...

  9. LiveBinding应用 dataBind 数据绑定

    http://blog.csdn.net/embarcaderochina/article/details/50352193 firemonkey grid/listview dataBind,数据绑 ...

随机推荐

  1. 3.4.1 使用过滤式扩展方法(P43-44)

    对IEnumerable<T>执行标准并且同样返回IEnumerable<T>的扩展方法,可以使用yield关键字对源数据中的项应用选择标准,已生成精简的结果集. public ...

  2. ssh隧道(通过跳板机)连接mysql

    案例: A服务器   B服务器   C服务器mysql 现在mysql服务器C只能通过内网访问,B服务器就能通过内网连接访问到mysql A服务器无法直接连接C服务器mysql,所以要通过跳板机(跳板 ...

  3. JS中constructor与prototype关系概论

    在学习JS的面向对象过程中,一直对constructor与prototype感到很迷惑,看了一些博客与书籍,觉得自己弄明白了,现在记录如下:     我们都知道,在JS中有一个function的东西. ...

  4. LINUX 操作记录到syslog,并发送到syslog服务器上

    首先配置命令记录到syslog中: 在客户端的/etc/bashrc  下添加: logger -p local3.info  \"`who am i` ================== ...

  5. Jquery倒计时源码分享

    在静态页添加显示倒计时的容器,并引用下面脚本,代入时间参数即可使用. timeoutDate——到期时间,时间格式为2014/01/01或2014/1/1 D——天 H——小时 M——分钟 S——秒 ...

  6. Chrome即将封杀Google Earth、Google Talk等插件

    昨日,Chrome安全工程师Justin Schuh在官方博客中写道,到明年一月份,谷歌将封杀一系列基于NPAPI框架标准的浏览器插件.其中包括谷歌地球(Google Earth).Google Ta ...

  7. java应用简单递归

    毕业后就怎么学过算法,还在上学的时候学过数据结构,现在基本上都还给老师了,可惜老师学费没有还给我... 情景: 类似于给定一个数字,算他由多少个数字组成,比如:36 现在有10.5.1 ,那么最佳帅3 ...

  8. iOS 关于时间天数星期月份的总结

    #import <Foundation/Foundation.h> @interface NSDate (SLExtend) // 判断是否是本周更早 - (BOOL)isThisWeek ...

  9. [QT_FFMPEG]学习问题: 刚开始移植ffmpeg,测试时出现 undefined reference to `avcodec_configuration()'

    使用环境: window: win7 x64 QT: qt5.8.0 MinGW530 移植的教程: 流若浅  Qt ffmpeg环境搭建 : http://www.cnblogs.com/liuru ...

  10. 利用按钮来控制不同activity页面的移动

    1.现在手机都是利用移动的做法来使界面的跳转更美观. 那么对于一个activity来说的话,是会有一个坐标的(左上角为(0,0)坐标) 右为x轴且为正,下为y轴且为负. 由于要使界面跳转,可以水平方向 ...