mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 21:50:16 +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);
|
||||
|
||||
TDataSetScrolledEvent = procedure(DataSet: TDataSet; Distance: Integer) of object;
|
||||
TDBGridClickEvent = 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;
|
||||
TDataSetScrolledEvent =
|
||||
procedure(DataSet: TDataSet; Distance: Integer) of object;
|
||||
|
||||
TDBGridClickEvent =
|
||||
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 =
|
||||
procedure (Sender: TObject; const Field: TField; var Value: string) of object;
|
||||
TUserCheckBoxBitmapEvent = procedure(Sender: TObject;
|
||||
const CheckedState: TDbGridCheckboxState; ABitmap: TBitmap) of object;
|
||||
procedure (Sender: TObject; const Field: TField;
|
||||
var Value: string) of object;
|
||||
|
||||
TUserCheckBoxBitmapEvent =
|
||||
procedure(Sender: TObject; const CheckedState: TDbGridCheckboxState;
|
||||
ABitmap: TBitmap) of object;
|
||||
|
||||
type
|
||||
|
||||
@ -268,6 +279,7 @@ type
|
||||
FOnCellClick: TDBGridClickEvent;
|
||||
FOnColEnter,FOnColExit: TNotifyEvent;
|
||||
FOnColumnMoved: TMovedEvent;
|
||||
FOnColumnSized: TNotifyEvent;
|
||||
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||
FOnFieldEditMask: TGetDbEditMaskEvent;
|
||||
FOnTitleClick: TDBGridClickEvent;
|
||||
@ -420,6 +432,7 @@ type
|
||||
property OnColEnter: TNotifyEvent read FOnColEnter write FOnColEnter;
|
||||
property OnColExit: TNotifyEvent read FOnColExit write FOnColExit;
|
||||
property OnColumnMoved: TMovedEvent read FOnColumnMoved write FOnColumnMoved;
|
||||
property OnColumnSized: TNotifyEvent read FOnColumnSized write FOnColumnSized;
|
||||
property OnDrawColumnCell: TDrawColumnCellEvent read FOnDrawColumnCell write FOnDrawColumnCell;
|
||||
property OnFieldEditMask: TGetDbEditMaskEvent read FOnFieldEditMask write FOnFieldEditMask;
|
||||
property OnTitleClick: TDBGridClickEvent read FOnTitleClick write FOnTitleClick;
|
||||
@ -437,7 +450,6 @@ type
|
||||
property ThumbTracking: boolean read GetThumbTracking write SetThumbTracking;
|
||||
end;
|
||||
|
||||
|
||||
TdbGrid=class(TCustomDbGrid)
|
||||
public
|
||||
property BorderColor;
|
||||
@ -497,6 +509,7 @@ type
|
||||
property OnColEnter;
|
||||
property OnColExit;
|
||||
property OnColumnMoved;
|
||||
property OnColumnSized;
|
||||
property OnDrawColumnCell;
|
||||
property OnDblClick;
|
||||
//property OnDragDrop;
|
||||
@ -2436,6 +2449,8 @@ begin
|
||||
Columns[i].Width := ColWidths[Index];
|
||||
end;
|
||||
FDefaultColWidths := False;
|
||||
if Assigned(OnColumnSized) then
|
||||
OnColumnSized(Self);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user