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

  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;

 

你可能感兴趣的:(checkbox)