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. 机器学习算法--svm实战

    1.不平衡数据分类问题 对于非平衡级分类超平面,使用不平衡SVC找出最优分类超平面,基本的思想是,我们先找到一个普通的分类超平面,自动进行校正,求出最优的分类超平面 测试代码如下: import nu ...

  2. 基于Oracle的SQL优化(崔华著)-学习笔记

    201704171025 01. 列rows记录的就是执行计划中每一个执行步骤所对应的Cardinality的值 列Cost(%CPU)记录的就是执行计划中的每一个执行步骤对应的成本 02. Comp ...

  3. mysqli使用记录

    1.批量插入数据insert 方式一:insert into tableName (id,name,age) values ('1','张三','12'),('2','李四','16'),('3',' ...

  4. 【hive】cube和rollup函数

    cube 数据立方体(Data Cube),是多维模型的一个形象的说法.(关于多维模型这里不讲述,在数据仓库设计过程中还挺重要的,有兴趣自行查阅) 立方体其本身只有三维,但多维模型不仅限于三维模型,可 ...

  5. mysql中limit的用法详解[数据分页常用]

    在我们使用查询语句的时候,经常要返回前几条或者中间某几行的数据,这个时候怎么办呢?不用担心,mysql已经为我们提供了这样一个功能. SELECT * FROM table LIMIT [offset ...

  6. 记c#中构造函数中this的用法

    今天谈及这个话题,是因为在看别人代码,遇到的.本着知其然还要知其所以然的精神,在网上大肆查找了一遍.得到了一些答案.并在此做一个简单的笔记,以便自己和他人以后查找,与我一同成长进步. 在C#中this ...

  7. js控制easyui datagrid列的显示和隐藏

    easyui datagrid 列隐藏和显示 $('#grid').datagrid('hideColumn','列field'); //把hideColumn换成showColumn 即为显示列

  8. 在CMD中使用for命令对单行字符串做分割的方法

    我们都知道CMD中的for命令是执行循环命令的,数据来源可以是一个文件,一个命令的结果或一个字符串,只有这3种来源 如果是一个文件则对这个文件的所有字符串进行循环处理 如果是一个命令结果,那么对这个命 ...

  9. Linux 键盘输入#的时候变成£

    /********************************************************************************* * Linux 键盘输入#的时候变 ...

  10. C语言多线程pthread库相关函数说明

    线程相关操作说明 一 pthread_t pthread_t在头文件/usr/include/bits/pthreadtypes.h中定义: typedef unsigned long int pth ...