ehlibはどのようにコードを使ってcheckboxを選択しますか?

4432 ワード

  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;