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. devdocs

    https://devdocs.io/ docker run --rm -d --name devdocs -p 9292:9292 devdocs/devdocs

  2. linux yum安装lsof命令

    [root@ITC-MCC ~]# yum install lsof[USM] permission denied^C[root@ITC-MCC ~]# [root@ITC-MCC ~]# [root ...

  3. IOS-如何优雅地拦截按钮事件(判断是否需要登录)

    关于这个标题,起因是这样的. 最近一次做项目需求时,遇到这样一个需求,就是本来我们App是必须注册或者第三方登录才可以使用,现在希望不登录也可以浏览App里面的内容,只是在需要的时候才提示登录,并且在 ...

  4. [转载]字符串匹配的Boyer-Moore算法

    作者: 阮一峰 日期: 2013年5月 3日 上一篇文章,我介绍了KMP算法. 但是,它并不是效率最高的算法,实际采用并不多.各种文本编辑器的"查找"功能(Ctrl+F),大多采用 ...

  5. 006——php字符串中的处理函数(五)

    <?php /** * 一.addslashes() 在预定义字符串前添加反斜杠 * * stripslashes() 把转义字符串前的反斜杠删除 * get_magic_quotes_gpc( ...

  6. vue.js-列表分页

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. 动态更新ViewPager中的Fragment(替换Fragment)

    1.最近做需求,遇到一个问题,一个Fragment中包含了一个ViewPager,viewPager中包含一adapter ,adapter中包含了4个Fragment.想要动态替换第3个Fragme ...

  8. 建造者模式 build

    引出建造者模式: package com.disign.build; /** * Created by zhen on 2017-05-19. */ public class BuildPersonT ...

  9. STL标准库-容器-forward_list

    技术在于交流.沟通,本文为博主原创文章转载请注明出处并保持作品的完整性. forward_list即单向list,功能少额外开销就小.而且只能在前段插入元素 结构如下 一 定义 #include &l ...

  10. Linux DMA Engine framework(2)_功能介绍及解接口分析

    http://www.wowotech.net/linux_kenrel/dma_engine_api.html 补充 http://www.zhimengzhe.com/linux/259646.h ...