mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 07:29:21 +02:00
fixed hints
git-svn-id: trunk@3790 -
This commit is contained in:
parent
050eac5b86
commit
2390fc3513
@ -197,6 +197,9 @@ Const
|
|||||||
CL_CENTER = $10;
|
CL_CENTER = $10;
|
||||||
CL_BOTTOM = $20;
|
CL_BOTTOM = $20;
|
||||||
|
|
||||||
|
Type
|
||||||
|
EGridException = class(Exception);
|
||||||
|
|
||||||
|
|
||||||
Type
|
Type
|
||||||
TGridOption = (
|
TGridOption = (
|
||||||
@ -269,7 +272,6 @@ Type
|
|||||||
TStringCellEditor=Class(TCustomEdit)
|
TStringCellEditor=Class(TCustomEdit)
|
||||||
Private
|
Private
|
||||||
FGrid: TCustomGrid;
|
FGrid: TCustomGrid;
|
||||||
FLeaving: Boolean;
|
|
||||||
Protected
|
Protected
|
||||||
Procedure doExit; Override;
|
Procedure doExit; Override;
|
||||||
procedure KeyDown(var Key : Word; Shift : TShiftState); Override;
|
procedure KeyDown(var Key : Word; Shift : TShiftState); Override;
|
||||||
@ -1182,6 +1184,7 @@ Var
|
|||||||
begin
|
begin
|
||||||
// Calculate New Cached Values
|
// Calculate New Cached Values
|
||||||
FGCache.GridWidth:=0;
|
FGCache.GridWidth:=0;
|
||||||
|
FGCache.FixedWidth:=0;
|
||||||
For Tw:=0 To ColCount-1 do begin
|
For Tw:=0 To ColCount-1 do begin
|
||||||
FGCache.AccumWidth[Tw]:=Pointer(FGCache.GridWidth);
|
FGCache.AccumWidth[Tw]:=Pointer(FGCache.GridWidth);
|
||||||
FGCache.GridWidth:=FGCache.GridWidth + GetColWidths(Tw);
|
FGCache.GridWidth:=FGCache.GridWidth + GetColWidths(Tw);
|
||||||
@ -1191,6 +1194,7 @@ begin
|
|||||||
{$Endif}
|
{$Endif}
|
||||||
End;
|
End;
|
||||||
FGCache.Gridheight:=0;
|
FGCache.Gridheight:=0;
|
||||||
|
FGCache.FixedHeight:=0;
|
||||||
For Tw:=0 To RowCount-1 do begin
|
For Tw:=0 To RowCount-1 do begin
|
||||||
FGCache.AccumHeight[Tw]:=Pointer(FGCache.Gridheight);
|
FGCache.AccumHeight[Tw]:=Pointer(FGCache.Gridheight);
|
||||||
FGCache.Gridheight:=FGCache.Gridheight+GetRowHeights(Tw);
|
FGCache.Gridheight:=FGCache.Gridheight+GetRowHeights(Tw);
|
||||||
@ -1342,7 +1346,7 @@ begin
|
|||||||
Ch:=FGCache.ClientHeight; //ClientHeight;
|
Ch:=FGCache.ClientHeight; //ClientHeight;
|
||||||
|
|
||||||
Fw:=FGCache.FixedWidth; //GetFixedWidth;
|
Fw:=FGCache.FixedWidth; //GetFixedWidth;
|
||||||
Fh:=FGcache.FixedWidth; //GetFixedHeight;
|
Fh:=FGcache.FixedHeight; //GetFixedHeight;
|
||||||
|
|
||||||
OldTopLeft:=fTopLeft;
|
OldTopLeft:=fTopLeft;
|
||||||
While (fTopLeft.x>=0) And
|
While (fTopLeft.x>=0) And
|
||||||
@ -1398,7 +1402,6 @@ begin
|
|||||||
If Assigned(OnTopLeftChange) Then OnTopLeftChange(Self);
|
If Assigned(OnTopLeftChange) Then OnTopLeftChange(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$hints off}
|
|
||||||
procedure TCustomGrid.HeaderClick(IsColumn: Boolean; Index: Integer);
|
procedure TCustomGrid.HeaderClick(IsColumn: Boolean; Index: Integer);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
@ -1421,8 +1424,6 @@ end;
|
|||||||
procedure TCustomGrid.ColRowDeleted(IsColumn: Boolean; Index: Integer);
|
procedure TCustomGrid.ColRowDeleted(IsColumn: Boolean; Index: Integer);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
{$hints on}
|
|
||||||
|
|
||||||
|
|
||||||
procedure TCustomGrid.Paint;
|
procedure TCustomGrid.Paint;
|
||||||
begin
|
begin
|
||||||
@ -1902,8 +1903,6 @@ end;
|
|||||||
|
|
||||||
{ Reposition the scrollbars according to the current TopLeft }
|
{ Reposition the scrollbars according to the current TopLeft }
|
||||||
procedure TCustomGrid.UpdateScrollbarPos(Which: TControlScrollbar);
|
procedure TCustomGrid.UpdateScrollbarPos(Which: TControlScrollbar);
|
||||||
Var
|
|
||||||
I: Integer;
|
|
||||||
begin
|
begin
|
||||||
// Adjust ScrollBar Positions
|
// Adjust ScrollBar Positions
|
||||||
{$IfDef Scr1}
|
{$IfDef Scr1}
|
||||||
@ -1951,10 +1950,12 @@ end;
|
|||||||
|
|
||||||
procedure TCustomGrid.CheckFixedCount(aCol,aRow,aFCol,aFRow: Integer);
|
procedure TCustomGrid.CheckFixedCount(aCol,aRow,aFCol,aFRow: Integer);
|
||||||
begin
|
begin
|
||||||
If (aFCol<>0)And (aFCol>=aCol) Then
|
If AFRow<0 Then Raise EGridException.Create('FixedRows<0');
|
||||||
Raise Exception.Create('FixedCols can''t be <= than ColCount');
|
If AFCol<0 Then Raise EGridException.Create('FixedCols<0');
|
||||||
If (aFRow<>0)And (aFRow>=aRow) Then
|
If (ACol>0)And(aFCol>=ACol) Then
|
||||||
Raise Exception.Create('FixedRows can''t be <= than RowCount');
|
Raise EGridException.Create('FixedCols can''t be >= ColCount');
|
||||||
|
If (ARow>0)And(aFRow>=ARow) Then
|
||||||
|
Raise EGridException.Create('FixedRows can''t be >= RowCount');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Save to the cache the current visible grid (excluding fixed cells) }
|
{ Save to the cache the current visible grid (excluding fixed cells) }
|
||||||
@ -2206,6 +2207,7 @@ begin
|
|||||||
End;
|
End;
|
||||||
Fin:=Ini + Dim;
|
Fin:=Ini + Dim;
|
||||||
End;
|
End;
|
||||||
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -2787,8 +2789,7 @@ end;
|
|||||||
|
|
||||||
procedure TCustomGrid.PosEditor;
|
procedure TCustomGrid.PosEditor;
|
||||||
Var
|
Var
|
||||||
R: TRect;
|
R: TRect;
|
||||||
CurVisible: Boolean;
|
|
||||||
begin
|
begin
|
||||||
If fEditor<>nil Then begin
|
If fEditor<>nil Then begin
|
||||||
R:=ColRowToClientCellRect(FCol,FRow);
|
R:=ColRowToClientCellRect(FCol,FRow);
|
||||||
|
Loading…
Reference in New Issue
Block a user