EHlib在数据单元中显示字段值为图形。

-【定制网格数据单元】 
  在数据单元中显示字段值为图形。 
  TDBGridEh allows to show bitmaps from TImageList component depending on field values.

TDBGridEh 可以根据字段的值显示TImageList 组件中相应的BMP。

To show bitmaps depending on field values need:

要根据字段的值显示BMP图片需要,

Fill list of field values to Column.KeyList property (every value in separate line) and set Column.ImageList property to ImageList control that has the bitmap in according index.

填充字段的值到 Column.KeyList属性 中(每个值单独一行)并设置列的ImageList属性 到一个包含顺序BMP的 ImageList组件 。

Set Column.NotInKeyListIndex to index of bitmap that will be shown if field's value does not correspond to any value in KeyList (for instance you can set index of image for Null field value).

设置 NotInKeyListIndex 属性为 一个BMP图片索引,如果值不对应KeyList 中的任何一个值,比如 为 NULL字段只 设置一个图像索引。

At run time you are not allowed to edit bitmap in column cell.

运行时,你不能编辑列中的图片。

Use blank key and mouse click to set next value from Column.KeyList to the field;

使用空格键和鼠标单击 设置下一个值

Shift-blank key and Shift-Mouse click to set previous value from Column.KeyList.

前一个值

Set Column.DblClickNextval to True have allows to change value on mouse double click. 

 

  with DBGridEh1.FieldColumns['seller_flag'] do//不能使用 ColumnByName,除非已经设置好了 Column的name

  begin

    KeyList.CommaText := '0,1,2,3,4,5';

    NotInKeyListIndex := 0;

    ImageList := ImgLFlag;

  end;

 

你可能感兴趣的:(lib)