zoukankan      html  css  js  c++  java
  • 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;
  • 相关阅读:
    HDOJ1024(最大M子段和)
    HDOJ1025(最长上升子序列)
    HDOJ1022(模拟栈)
    HDOJ(1018)
    HDOJ1238(string)
    HDOJ1015(简单深搜)
    HDOJ1016(标准dfs)
    Tabbar视图切换,返回上一视图,添加item
    页面转换方法
    网络状态判断
  • 原文地址:https://www.cnblogs.com/CodeGear/p/4513067.html
Copyright © 2011-2022 走看看