首页 > 其他 > 详细

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

时间:2015-05-18 22:49:22      阅读:338      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!