码迷,mamicode.com
首页 > 其他好文 > 详细

ehlib 如何用代码,选中checkbox呢?

时间:2015-05-18 22:50:36      阅读:302      评论:0      收藏:0      [点我收藏+]

标签:

  TDBGridEh = class(TCustomDBGridEh)
  public
    property Col;
    property Row;
    property Canvas;
//    property GridHeight;
    property RowCount;
    property SelectedRows;  //这里




TBookmarkListEh = class(TBMListEh)
  private
    FGrid: TCustomDBGridEh;
    FRowsRef: TObjectList;
  protected
    function GetDataSet: TDataSet; override;
    procedure Invalidate; override;
    procedure SetCurrentRowSelected(Value: Boolean); override;// 这里


procedure TBookmarkListEh.SetCurrentRowSelected(Value: Boolean);
begin
  if Value and FGrid.DataSource.DataSet.IsEmpty then Exit;
  inherited SetCurrentRowSelected(Value); //这里
  FGrid.InvalidateRow(FGrid.Row);
end;


procedure TBMListEh.SetCurrentRowSelected(Value: Boolean);
var
  Index: Integer;
  Current: TUniBookmarkEh;
begin
  Current := CurrentRow;//这里
  if Find(Current, Index) = Value
    then Exit;
  if Value
    then InsertItem(Index, Current)
    else DeleteItem(Index);
end;


 

function TBMListEh.CurrentRow: TUniBookmarkEh;
begin
  {$IFDEF FPC}
  if not FLinkActive then RaiseBMListError(SInactiveDataset);
  {$ELSE}
  if not FLinkActive then RaiseBMListError(sDataSetClosed);
  {$ENDIF}
  Result := Dataset.Bookmark;
end;

 

ehlib 如何用代码,选中checkbox呢?

标签:

原文地址:http://www.cnblogs.com/CodeGear/p/4513067.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!