mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 07:50:20 +02:00
added dbgrid OnColumnSized
git-svn-id: trunk@9706 -
This commit is contained in:
parent
6fc60316d1
commit
f5bc0a2868
@ -83,15 +83,26 @@ type
|
|||||||
|
|
||||||
TDBGridCheckBoxState = (gcbpUnChecked, gcbpChecked, gcbpGrayed);
|
TDBGridCheckBoxState = (gcbpUnChecked, gcbpChecked, gcbpGrayed);
|
||||||
|
|
||||||
TDataSetScrolledEvent = procedure(DataSet: TDataSet; Distance: Integer) of object;
|
TDataSetScrolledEvent =
|
||||||
TDBGridClickEvent = procedure(Column: TColumn) of object;
|
procedure(DataSet: TDataSet; Distance: Integer) of object;
|
||||||
TMovedEvent = procedure(Sender: TObject; FromIndex, ToIndex: Integer) of object;
|
|
||||||
TDrawColumnCellEvent = procedure(Sender: TObject; const Rect: TRect;
|
TDBGridClickEvent =
|
||||||
DataCol: Integer; Column: TColumn; State: TGridDrawState) of object;
|
procedure(Column: TColumn) of object;
|
||||||
|
|
||||||
|
TMovedEvent =
|
||||||
|
procedure(Sender: TObject; FromIndex, ToIndex: Integer) of object;
|
||||||
|
|
||||||
|
TDrawColumnCellEvent =
|
||||||
|
procedure(Sender: TObject; const Rect: TRect; DataCol: Integer;
|
||||||
|
Column: TColumn; State: TGridDrawState) of object;
|
||||||
|
|
||||||
TGetDbEditMaskEvent =
|
TGetDbEditMaskEvent =
|
||||||
procedure (Sender: TObject; const Field: TField; var Value: string) of object;
|
procedure (Sender: TObject; const Field: TField;
|
||||||
TUserCheckBoxBitmapEvent = procedure(Sender: TObject;
|
var Value: string) of object;
|
||||||
const CheckedState: TDbGridCheckboxState; ABitmap: TBitmap) of object;
|
|
||||||
|
TUserCheckBoxBitmapEvent =
|
||||||
|
procedure(Sender: TObject; const CheckedState: TDbGridCheckboxState;
|
||||||
|
ABitmap: TBitmap) of object;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -268,6 +279,7 @@ type
|
|||||||
FOnCellClick: TDBGridClickEvent;
|
FOnCellClick: TDBGridClickEvent;
|
||||||
FOnColEnter,FOnColExit: TNotifyEvent;
|
FOnColEnter,FOnColExit: TNotifyEvent;
|
||||||
FOnColumnMoved: TMovedEvent;
|
FOnColumnMoved: TMovedEvent;
|
||||||
|
FOnColumnSized: TNotifyEvent;
|
||||||
FOnDrawColumnCell: TDrawColumnCellEvent;
|
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||||
FOnFieldEditMask: TGetDbEditMaskEvent;
|
FOnFieldEditMask: TGetDbEditMaskEvent;
|
||||||
FOnTitleClick: TDBGridClickEvent;
|
FOnTitleClick: TDBGridClickEvent;
|
||||||
@ -420,6 +432,7 @@ type
|
|||||||
property OnColEnter: TNotifyEvent read FOnColEnter write FOnColEnter;
|
property OnColEnter: TNotifyEvent read FOnColEnter write FOnColEnter;
|
||||||
property OnColExit: TNotifyEvent read FOnColExit write FOnColExit;
|
property OnColExit: TNotifyEvent read FOnColExit write FOnColExit;
|
||||||
property OnColumnMoved: TMovedEvent read FOnColumnMoved write FOnColumnMoved;
|
property OnColumnMoved: TMovedEvent read FOnColumnMoved write FOnColumnMoved;
|
||||||
|
property OnColumnSized: TNotifyEvent read FOnColumnSized write FOnColumnSized;
|
||||||
property OnDrawColumnCell: TDrawColumnCellEvent read FOnDrawColumnCell write FOnDrawColumnCell;
|
property OnDrawColumnCell: TDrawColumnCellEvent read FOnDrawColumnCell write FOnDrawColumnCell;
|
||||||
property OnFieldEditMask: TGetDbEditMaskEvent read FOnFieldEditMask write FOnFieldEditMask;
|
property OnFieldEditMask: TGetDbEditMaskEvent read FOnFieldEditMask write FOnFieldEditMask;
|
||||||
property OnTitleClick: TDBGridClickEvent read FOnTitleClick write FOnTitleClick;
|
property OnTitleClick: TDBGridClickEvent read FOnTitleClick write FOnTitleClick;
|
||||||
@ -437,7 +450,6 @@ type
|
|||||||
property ThumbTracking: boolean read GetThumbTracking write SetThumbTracking;
|
property ThumbTracking: boolean read GetThumbTracking write SetThumbTracking;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
TdbGrid=class(TCustomDbGrid)
|
TdbGrid=class(TCustomDbGrid)
|
||||||
public
|
public
|
||||||
property BorderColor;
|
property BorderColor;
|
||||||
@ -497,6 +509,7 @@ type
|
|||||||
property OnColEnter;
|
property OnColEnter;
|
||||||
property OnColExit;
|
property OnColExit;
|
||||||
property OnColumnMoved;
|
property OnColumnMoved;
|
||||||
|
property OnColumnSized;
|
||||||
property OnDrawColumnCell;
|
property OnDrawColumnCell;
|
||||||
property OnDblClick;
|
property OnDblClick;
|
||||||
//property OnDragDrop;
|
//property OnDragDrop;
|
||||||
@ -2436,6 +2449,8 @@ begin
|
|||||||
Columns[i].Width := ColWidths[Index];
|
Columns[i].Width := ColWidths[Index];
|
||||||
end;
|
end;
|
||||||
FDefaultColWidths := False;
|
FDefaultColWidths := False;
|
||||||
|
if Assigned(OnColumnSized) then
|
||||||
|
OnColumnSized(Self);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user