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. UVALive-3645 Objective: Berlin (最大流:时序模型)

    题目大意:有n个城市,m条航班.已知每条航班的起点和终点,还有每条航班的载客量.出发时间.到达时间.并且要求在任何一个城市(起点.终点除外)都至少要有30分钟的中转时间,求起点到终点的最大客流量. 题 ...

  2. Reverse engineer powerdesigner link odbc

    Reverse engineer powerdesigner link odbc           Option Explicit ValidationMode = True Interactive ...

  3. checkbox选中的问题(Ajax.BeginForm)

    判断checkbox选中的方法方法一:if ($("#checkbox-id")get(0).checked) { // do something} 方法二:if($('#chec ...

  4. windows安装mysql方法 mysql5.7以后的安装方法

    mysql 安装步骤: 1.www.mysql.com   下载mysql 2.解压mysql到E盘,或者其他盘解压后   E:\mysql\bin   (bin一定要按照这个目录) 3.这bin目录 ...

  5. 数据库连接池druid 监控台配置

    这篇文章主要讲druid 监控台的配置及界面使用介绍. 业界把 Druid 和 HikariCP 做对比后,虽说 HikariCP 的性能比 Druid 高,但是因为 Druid 包括很多维度的统计和 ...

  6. 在jenkins和sonar中集成jacoco(二)--在jenkins中生成jacoco覆盖率报告

    先要在jenkins上安装jacoco的插件,安装完成之后在job的配置项中可以增加这个选项: 第一个录入框是你的覆盖率文件(exec),第二个是class文件目录,第三个是源代码文件目录. 配置好了 ...

  7. win7下解压安装mysql的方法

    在win7下通过解压安装mysql 5.7一直出现启动不成功,网上找了好久终于找到一个解决方法,记录一下: 1.解压下载的压缩包 2.在解压目录下,将my-default.ini改名为my.ini, ...

  8. ubuntu16 Intellij Idea Install&config

    1,下载idea二进制文件,有免费和不免费的. https://www.jetbrains.com/idea/download/#section=linux 2,解压下载文件. tar -xvzf . ...

  9. PyalgoTrade 打印收盘价(二)

    让我们从一个简单的策略开始,就是在打印收盘价格的过程中: from pyalgotrade import strategy from pyalgotrade.barfeed import yahoof ...

  10. nginx 只容许域名访问禁止掉 ip 访问

    在原有 nginx server 的基础上再加上相同端口的配置 server {            listen 80 default_server;            server_name ...