mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-04 17:38:49 +02:00
renamed DrawByRows to DrawAllRows
git-svn-id: trunk@8644 -
This commit is contained in:
parent
ee01d36329
commit
0c9ab7d58b
@ -1,9 +1,11 @@
|
|||||||
object MessagesView: TMessagesView
|
object MessagesView: TMessagesView
|
||||||
|
ActiveControl = MessageView
|
||||||
BorderStyle = bsSizeToolWin
|
BorderStyle = bsSizeToolWin
|
||||||
Caption = 'MessagesView'
|
Caption = 'MessagesView'
|
||||||
ClientHeight = 79
|
ClientHeight = 79
|
||||||
ClientWidth = 722
|
ClientWidth = 722
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
|
OnDeactivate = FormDeactivate
|
||||||
OnKeyDown = MessagesViewKeyDown
|
OnKeyDown = MessagesViewKeyDown
|
||||||
PixelsPerInch = 112
|
PixelsPerInch = 112
|
||||||
HorzScrollBar.Page = 721
|
HorzScrollBar.Page = 721
|
||||||
@ -15,6 +17,7 @@ object MessagesView: TMessagesView
|
|||||||
object MessageView: TListBox
|
object MessageView: TListBox
|
||||||
Align = alClient
|
Align = alClient
|
||||||
MultiSelect = True
|
MultiSelect = True
|
||||||
|
OnExit = MessageViewExit
|
||||||
PopupMenu = MainPopupMenu
|
PopupMenu = MainPopupMenu
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TopIndex = -1
|
TopIndex = -1
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TMessagesView','FORMDATA',[
|
LazarusResources.Add('TMessagesView','FORMDATA',[
|
||||||
'TPF0'#13'TMessagesView'#12'MessagesView'#11'BorderStyle'#7#13'bsSizeToolWin'
|
'TPF0'#13'TMessagesView'#12'MessagesView'#13'ActiveControl'#7#11'MessageView'
|
||||||
+#7'Caption'#6#12'MessagesView'#12'ClientHeight'#2'O'#11'ClientWidth'#3#210#2
|
+#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#12'MessagesView'#12'Client'
|
||||||
+#10'KeyPreview'#9#9'OnKeyDown'#7#19'MessagesViewKeyDown'#13'PixelsPerInch'#2
|
+'Height'#2'O'#11'ClientWidth'#3#210#2#10'KeyPreview'#9#12'OnDeactivate'#7#14
|
||||||
|
+'FormDeactivate'#9'OnKeyDown'#7#19'MessagesViewKeyDown'#13'PixelsPerInch'#2
|
||||||
+'p'#18'HorzScrollBar.Page'#3#209#2#18'VertScrollBar.Page'#2'N'#4'Left'#3#6#1
|
+'p'#18'HorzScrollBar.Page'#3#209#2#18'VertScrollBar.Page'#2'N'#4'Left'#3#6#1
|
||||||
+#6'Height'#2'O'#3'Top'#3#6#2#5'Width'#3#210#2#0#8'TListBox'#11'MessageView'#5
|
+#6'Height'#2'O'#3'Top'#3#6#2#5'Width'#3#210#2#0#8'TListBox'#11'MessageView'#5
|
||||||
+'Align'#7#8'alClient'#11'MultiSelect'#9#9'PopupMenu'#7#13'MainPopupMenu'#8'T'
|
+'Align'#7#8'alClient'#11'MultiSelect'#9#6'OnExit'#7#15'MessageViewExit'#9'Po'
|
||||||
+'abOrder'#2#0#8'TopIndex'#2#255#6'Height'#2'O'#5'Width'#3#210#2#0#0#10'TPopu'
|
+'pupMenu'#7#13'MainPopupMenu'#8'TabOrder'#2#0#8'TopIndex'#2#255#6'Height'#2
|
||||||
+'pMenu'#13'MainPopupMenu'#4'left'#2'.'#3'top'#2')'#0#0#0
|
+'O'#5'Width'#3#210#2#0#0#10'TPopupMenu'#13'MainPopupMenu'#4'left'#2'.'#3'top'
|
||||||
|
+#2')'#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -90,9 +90,11 @@ type
|
|||||||
procedure CopyAllMenuItemClick(Sender: TObject);
|
procedure CopyAllMenuItemClick(Sender: TObject);
|
||||||
procedure CopyAllAndHiddenMenuItemClick(Sender: TObject);
|
procedure CopyAllAndHiddenMenuItemClick(Sender: TObject);
|
||||||
procedure CopyMenuItemClick(Sender: TObject);
|
procedure CopyMenuItemClick(Sender: TObject);
|
||||||
|
procedure FormDeactivate(Sender: TObject);
|
||||||
procedure HelpMenuItemClick(Sender: TObject);
|
procedure HelpMenuItemClick(Sender: TObject);
|
||||||
procedure MessageViewDblClicked(Sender: TObject);
|
procedure MessageViewDblClicked(Sender: TObject);
|
||||||
procedure MessageViewClicked(Sender: TObject);
|
procedure MessageViewClicked(Sender: TObject);
|
||||||
|
procedure MessageViewExit(Sender: TObject);
|
||||||
procedure MessagesViewKeyDown(Sender: TObject; var Key: word;
|
procedure MessagesViewKeyDown(Sender: TObject; var Key: word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
procedure MessageViewDrawItem(Control: TWinControl; Index: Integer;
|
procedure MessageViewDrawItem(Control: TWinControl; Index: Integer;
|
||||||
@ -512,6 +514,11 @@ begin
|
|||||||
Clipboard.AsText := MessageView.GetSelectedText;
|
Clipboard.AsText := MessageView.GetSelectedText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMessagesView.FormDeactivate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FLastSelectedIndex:=-1;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMessagesView.HelpMenuItemClick(Sender: TObject);
|
procedure TMessagesView.HelpMenuItemClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ExecuteIDECommand(Self, ecContextHelp);
|
ExecuteIDECommand(Self, ecContextHelp);
|
||||||
@ -524,6 +531,11 @@ begin
|
|||||||
DoSelectionChange;
|
DoSelectionChange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMessagesView.MessageViewExit(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FLastSelectedIndex:=-1;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMessagesView.MessagesViewKeyDown(Sender: TObject; var Key: word;
|
procedure TMessagesView.MessagesViewKeyDown(Sender: TObject; var Key: word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
|
@ -321,7 +321,7 @@ type
|
|||||||
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
||||||
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
||||||
procedure DoOnChangeBounds; override;
|
procedure DoOnChangeBounds; override;
|
||||||
procedure DrawByRows; override;
|
procedure DrawAllRows; override;
|
||||||
procedure DrawFocusRect(aCol,aRow:Integer; ARect:TRect); override;
|
procedure DrawFocusRect(aCol,aRow:Integer; ARect:TRect); override;
|
||||||
procedure DrawRow(ARow: Integer); override;
|
procedure DrawRow(ARow: Integer); override;
|
||||||
procedure DrawCell(aCol,aRow: Integer; aRect: TRect; aState:TGridDrawState); override;
|
procedure DrawCell(aCol,aRow: Integer; aRect: TRect; aState:TGridDrawState); override;
|
||||||
@ -2196,7 +2196,7 @@ begin
|
|||||||
{$ifdef dbgdbgrid}DebugLn('DbGrid.MoveSelection FIN');{$Endif}
|
{$ifdef dbgdbgrid}DebugLn('DbGrid.MoveSelection FIN');{$Endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomDbGrid.DrawByRows;
|
procedure TCustomDbGrid.DrawAllRows;
|
||||||
var
|
var
|
||||||
CurActiveRecord: Integer;
|
CurActiveRecord: Integer;
|
||||||
begin
|
begin
|
||||||
@ -2204,7 +2204,7 @@ begin
|
|||||||
CurActiveRecord:=FDataLink.ActiveRecord;
|
CurActiveRecord:=FDataLink.ActiveRecord;
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
inherited DrawByRows;
|
inherited DrawAllRows;
|
||||||
finally
|
finally
|
||||||
if FDataLink.Active then
|
if FDataLink.Active then
|
||||||
FDataLink.ActiveRecord:=CurActiveRecord;
|
FDataLink.ActiveRecord:=CurActiveRecord;
|
||||||
|
@ -472,7 +472,7 @@ type
|
|||||||
ClientHeight: Integer; // Height-HorzScrollbar.Size
|
ClientHeight: Integer; // Height-HorzScrollbar.Size
|
||||||
ScrollWidth: Integer; // ClientWidth-FixedWidth
|
ScrollWidth: Integer; // ClientWidth-FixedWidth
|
||||||
ScrollHeight: Integer; // ClientHeight-FixedHeight
|
ScrollHeight: Integer; // ClientHeight-FixedHeight
|
||||||
VisibleGrid: TRect; // Visible non fixed rectagle of cells
|
VisibleGrid: TRect; // Visible non fixed rectangle of cellcoordinates
|
||||||
MaxClientXY: Tpoint; // VisibleGrid.BottomRight (pixel) coordinates
|
MaxClientXY: Tpoint; // VisibleGrid.BottomRight (pixel) coordinates
|
||||||
ValidRows: boolean; // true if there are not fixed columns to show
|
ValidRows: boolean; // true if there are not fixed columns to show
|
||||||
ValidCols: boolean; // true if there are not fixed rows to show
|
ValidCols: boolean; // true if there are not fixed rows to show
|
||||||
@ -687,7 +687,7 @@ type
|
|||||||
procedure DoPasteFromClipboard; virtual;
|
procedure DoPasteFromClipboard; virtual;
|
||||||
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
procedure DoSetBounds(ALeft, ATop, AWidth, AHeight: integer); override;
|
||||||
procedure DrawBorder;
|
procedure DrawBorder;
|
||||||
procedure DrawByRows; virtual;
|
procedure DrawAllRows; virtual;
|
||||||
procedure DrawCell(aCol,aRow:Integer; aRect:TRect; aState:TGridDrawState); virtual;
|
procedure DrawCell(aCol,aRow:Integer; aRect:TRect; aState:TGridDrawState); virtual;
|
||||||
procedure DrawCellGrid(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState); virtual;
|
procedure DrawCellGrid(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState); virtual;
|
||||||
procedure DrawCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; aText: String); virtual;
|
procedure DrawCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; aText: String); virtual;
|
||||||
@ -1711,6 +1711,7 @@ begin
|
|||||||
CheckFixedCount(ColCount, RowCount, FFixedCols, AValue);
|
CheckFixedCount(ColCount, RowCount, FFixedCols, AValue);
|
||||||
FFixedRows:=AValue;
|
FFixedRows:=AValue;
|
||||||
fTopLeft.y:=AValue;
|
fTopLeft.y:=AValue;
|
||||||
|
//DebugLn('TCustomGrid.SetFixedRows ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
FRow:=AValue;
|
FRow:=AValue;
|
||||||
UpdateSelectionRange;
|
UpdateSelectionRange;
|
||||||
if not (csLoading in ComponentState) then
|
if not (csLoading in ComponentState) then
|
||||||
@ -1805,6 +1806,7 @@ begin
|
|||||||
if RowCount=0 then begin
|
if RowCount=0 then begin
|
||||||
FFixedRows:=0;
|
FFixedRows:=0;
|
||||||
FTopLeft.Y:=0;
|
FTopLeft.Y:=0;
|
||||||
|
//DebugLn('TCustomGrid.AdjustCount A ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
AddDel(FRows, 1);
|
AddDel(FRows, 1);
|
||||||
FGCache.AccumHeight.Count:=1;
|
FGCache.AccumHeight.Count:=1;
|
||||||
end;
|
end;
|
||||||
@ -1816,6 +1818,7 @@ begin
|
|||||||
OldCount:=ColCount;
|
OldCount:=ColCount;
|
||||||
if (OldValue=0)and(NewValue>=0) then begin
|
if (OldValue=0)and(NewValue>=0) then begin
|
||||||
FTopleft.Y:=FFixedRows;
|
FTopleft.Y:=FFixedRows;
|
||||||
|
//DebugLn('TCustomGrid.AdjustCount B ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
if FCols.Count=0 then begin
|
if FCols.Count=0 then begin
|
||||||
FFixedCols:=0;
|
FFixedCols:=0;
|
||||||
FTopLeft.X:=0;
|
FTopLeft.X:=0;
|
||||||
@ -2286,7 +2289,6 @@ var
|
|||||||
OldTopLeft:TPoint;
|
OldTopLeft:TPoint;
|
||||||
Xinc,YInc: Integer;
|
Xinc,YInc: Integer;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
OldTopLeft:=fTopLeft;
|
OldTopLeft:=fTopLeft;
|
||||||
|
|
||||||
while (fTopLeft.x>=0) and
|
while (fTopLeft.x>=0) and
|
||||||
@ -2300,7 +2302,7 @@ begin
|
|||||||
if Rnew.Left + FGCache.TLColOff < FGCache.FixedWidth then Xinc:=-1
|
if Rnew.Left + FGCache.TLColOff < FGCache.FixedWidth then Xinc:=-1
|
||||||
else if RNew.Right + FGCache.TLColOff > FGCache.ClientWidth then XInc:=1;
|
else if RNew.Right + FGCache.TLColOff > FGCache.ClientWidth then XInc:=1;
|
||||||
Yinc:=0;
|
Yinc:=0;
|
||||||
if RNew.Top + FGCAche.TLRowOff < FGcache.FixedHeight then Yinc:=-1
|
if RNew.Top + FGCache.TLRowOff < FGCache.FixedHeight then Yinc:=-1
|
||||||
else if RNew.Bottom + FGCache.TLRowOff > FGCache.ClientHeight then YInc:=1;
|
else if RNew.Bottom + FGCache.TLRowOff > FGCache.ClientHeight then YInc:=1;
|
||||||
|
|
||||||
with FTopLeft do
|
with FTopLeft do
|
||||||
@ -2316,6 +2318,7 @@ begin
|
|||||||
Inc(FTopLeft.x, XInc);
|
Inc(FTopLeft.x, XInc);
|
||||||
Inc(FTopLeft.y, YInc);
|
Inc(FTopLeft.y, YInc);
|
||||||
end;
|
end;
|
||||||
|
//DebugLn('TCustomGrid.ScrollToCell A ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
|
|
||||||
Result:=not PointIgual(OldTopleft,FTopLeft);
|
Result:=not PointIgual(OldTopleft,FTopLeft);
|
||||||
if result then doTopleftChange(False)
|
if result then doTopleftChange(False)
|
||||||
@ -2389,7 +2392,7 @@ begin
|
|||||||
inherited Paint;
|
inherited Paint;
|
||||||
if FUpdateCount=0 then begin
|
if FUpdateCount=0 then begin
|
||||||
DrawEdges;
|
DrawEdges;
|
||||||
DrawByRows;
|
DrawAllRows;
|
||||||
DrawColRowMoving;
|
DrawColRowMoving;
|
||||||
DrawBorder;
|
DrawBorder;
|
||||||
end;
|
end;
|
||||||
@ -2604,7 +2607,7 @@ begin
|
|||||||
DrawCellGrid(aCol,aRow,aRect,aState);
|
DrawCellGrid(aCol,aRow,aRect,aState);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.DrawByRows;
|
procedure TCustomGrid.DrawAllRows;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
@ -2880,7 +2883,7 @@ begin
|
|||||||
if FEditor<>nil then
|
if FEditor<>nil then
|
||||||
EditorGetValue;
|
EditorGetValue;
|
||||||
|
|
||||||
TL:= PtrInt(FGCache.AccumWidth[ FGCache.MaxTopLeft.X ]) - FGCAche.FixedWidth;
|
TL:= PtrInt(FGCache.AccumWidth[ FGCache.MaxTopLeft.X ]) - FGCache.FixedWidth;
|
||||||
CTL:= PtrInt(FGCache.AccumWidth[ FtopLeft.X ]) - FGCache.FixedWidth;
|
CTL:= PtrInt(FGCache.AccumWidth[ FtopLeft.X ]) - FGCache.FixedWidth;
|
||||||
|
|
||||||
case message.ScrollCode of
|
case message.ScrollCode of
|
||||||
@ -2959,7 +2962,7 @@ begin
|
|||||||
EditorGetValue;
|
EditorGetValue;
|
||||||
|
|
||||||
TL:= PtrInt(FGCache.AccumHeight[ FGCache.MaxTopLeft.Y ]) - FGCache.FixedHeight;
|
TL:= PtrInt(FGCache.AccumHeight[ FGCache.MaxTopLeft.Y ]) - FGCache.FixedHeight;
|
||||||
CTL:= PtrInt(FGCache.AccumHeight[ FtopLeft.Y ]) - FGCache.FixedHeight;
|
CTL:= PtrInt(FGCache.AccumHeight[ FTopLeft.Y ]) - FGCache.FixedHeight;
|
||||||
|
|
||||||
case message.ScrollCode of
|
case message.ScrollCode of
|
||||||
// Scrolls to start / end of the text
|
// Scrolls to start / end of the text
|
||||||
@ -2983,7 +2986,7 @@ begin
|
|||||||
SB_ENDSCROLL: Exit;
|
SB_ENDSCROLL: Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if C > Tl then C := TL else
|
if C > TL then C := TL else
|
||||||
if C < 0 then C := 0;
|
if C < 0 then C := 0;
|
||||||
|
|
||||||
{$Ifdef dbgScroll}
|
{$Ifdef dbgScroll}
|
||||||
@ -3085,6 +3088,7 @@ begin
|
|||||||
TryTL:=ScrollGrid(False,aCol, aRow);
|
TryTL:=ScrollGrid(False,aCol, aRow);
|
||||||
if not PointIgual(TryTL, FTopLeft) then begin
|
if not PointIgual(TryTL, FTopLeft) then begin
|
||||||
FTopLeft:=TryTL;
|
FTopLeft:=TryTL;
|
||||||
|
//DebugLn('TCustomGrid.TryScrollTo A ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
doTopleftChange(False);
|
doTopleftChange(False);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -3221,7 +3225,7 @@ begin
|
|||||||
OldTopLeft := FTopLeft;
|
OldTopLeft := FTopLeft;
|
||||||
Result:= False;
|
Result:= False;
|
||||||
|
|
||||||
with FTopleft do
|
with FTopleft do begin
|
||||||
if CheckCols and (X>FixedCols) then begin
|
if CheckCols and (X>FixedCols) then begin
|
||||||
W := FGCache.ScrollWidth-ColWidths[aCol]-PtrInt(FGCache.AccumWidth[aCol]);
|
W := FGCache.ScrollWidth-ColWidths[aCol]-PtrInt(FGCache.AccumWidth[aCol]);
|
||||||
while (x>FixedCols)and(W+PtrInt(FGCache.AccumWidth[x])>=ColWidths[x-1]) do
|
while (x>FixedCols)and(W+PtrInt(FGCache.AccumWidth[x])>=ColWidths[x-1]) do
|
||||||
@ -3229,14 +3233,17 @@ begin
|
|||||||
Dec(x);
|
Dec(x);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
with FTopleft do
|
with FTopleft do begin
|
||||||
if CheckRows and (Y > FixedRows) then begin
|
if CheckRows and (Y > FixedRows) then begin
|
||||||
W := FGCache.ScrollHeight-RowHeights[aRow]-PtrInt(FGCache.AccumHeight[aRow]);
|
W := FGCache.ScrollHeight-RowHeights[aRow]-PtrInt(FGCache.AccumHeight[aRow]);
|
||||||
while (y>FixedRows)and(W+PtrInt(FGCache.AccumHeight[y])>=RowHeights[y-1]) do
|
while (y>FixedRows)and(W+PtrInt(FGCache.AccumHeight[y])>=RowHeights[y-1]) do
|
||||||
begin
|
begin
|
||||||
Dec(y);
|
Dec(y);
|
||||||
end;
|
end;
|
||||||
|
//DebugLn('TCustomGrid.CheckTopLeft A ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := not PointIgual(OldTopleft,FTopLeft);
|
Result := not PointIgual(OldTopleft,FTopLeft);
|
||||||
@ -3641,11 +3648,11 @@ begin
|
|||||||
Offset := Offset - GetBorderWidth;
|
Offset := Offset - GetBorderWidth;
|
||||||
if Offset<0 then Exit; // Out of Range;
|
if Offset<0 then Exit; // Out of Range;
|
||||||
|
|
||||||
with FGCache do
|
with FGCache do begin
|
||||||
if IsCol then begin
|
if IsCol then begin
|
||||||
// begin to count Cols from 0 but ...
|
// begin to count Cols from 0 but ...
|
||||||
if Fisical and (Offset>FixedWidth-1) then begin
|
if Fisical and (Offset>FixedWidth-1) then begin
|
||||||
Index := FTopLeft.X; // In scrolled view, then begin from FtopLeft col
|
Index := FTopLeft.X; // In scrolled view, then begin from FTopLeft col
|
||||||
if (Index>=0) and (Index<ColCount) then
|
if (Index>=0) and (Index<ColCount) then
|
||||||
Offset:=Offset-FixedWidth+PtrInt(AccumWidth[Index])+TLColOff;
|
Offset:=Offset-FixedWidth+PtrInt(AccumWidth[Index])+TLColOff;
|
||||||
if (Index<0) or (Index>=ColCount) or (Offset>GridWidth-1) then begin
|
if (Index<0) or (Index>=ColCount) or (Offset>GridWidth-1) then begin
|
||||||
@ -3662,6 +3669,7 @@ begin
|
|||||||
|
|
||||||
end else begin
|
end else begin
|
||||||
|
|
||||||
|
//DebugLn('TCustomGrid.OffsetToColRow ',DbgSName(Self),' Fisical=',dbgs(Fisical),' Offset=',dbgs(Offset),' FixedHeight=',dbgs(FixedHeight),' FTopLeft=',dbgs(FTopLeft),' RowCount=',dbgs(RowCount),' TLRowOff=',dbgs(TLRowOff));
|
||||||
if Fisical and (Offset>FixedHeight-1) then begin
|
if Fisical and (Offset>FixedHeight-1) then begin
|
||||||
Index:=FTopLeft.Y;
|
Index:=FTopLeft.Y;
|
||||||
if (Index>=0) and (Index<RowCount) then
|
if (Index>=0) and (Index<RowCount) then
|
||||||
@ -3679,6 +3687,7 @@ begin
|
|||||||
if Index<>0 then Rest:=Offset-PtrInt(AccumHeight[Index]);
|
if Index<>0 then Rest:=Offset-PtrInt(AccumHeight[Index]);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
result := True;
|
result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -3888,6 +3897,7 @@ procedure TCustomGrid.DoOPDeleteColRow(IsColumn: Boolean; index: Integer);
|
|||||||
if Index<FixedRows then begin
|
if Index<FixedRows then begin
|
||||||
Dec(FFixedRows);
|
Dec(FFixedRows);
|
||||||
FTopLeft.y := FFixedRows;
|
FTopLeft.y := FFixedRows;
|
||||||
|
//DebugLn('TCustomGrid.doDeleteColumn A ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
end;
|
end;
|
||||||
FRows.Delete(Index);
|
FRows.Delete(Index);
|
||||||
FGCache.AccumHeight.Delete(Index);
|
FGCache.AccumHeight.Delete(Index);
|
||||||
@ -4261,7 +4271,7 @@ procedure TCustomGrid.DoEditorShow;
|
|||||||
begin
|
begin
|
||||||
{$ifdef dbgGrid}DebugLn('grid.DoEditorShow INIT');{$endif}
|
{$ifdef dbgGrid}DebugLn('grid.DoEditorShow INIT');{$endif}
|
||||||
ScrollToCell(FCol,FRow);
|
ScrollToCell(FCol,FRow);
|
||||||
Editor.parent := nil;
|
Editor.Parent := nil;
|
||||||
EditorSetValue;
|
EditorSetValue;
|
||||||
Editor.Parent:=Self;
|
Editor.Parent:=Self;
|
||||||
Editor.Visible:=True;
|
Editor.Visible:=True;
|
||||||
@ -4312,6 +4322,7 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
{$IfDef dbgGrid}DebugLn('DoEnter - Ext');{$Endif}
|
{$IfDef dbgGrid}DebugLn('DoEnter - Ext');{$Endif}
|
||||||
if EditorAlwaysShown then begin
|
if EditorAlwaysShown then begin
|
||||||
|
|
||||||
SelectEditor;
|
SelectEditor;
|
||||||
if Feditor<>nil then
|
if Feditor<>nil then
|
||||||
EditorShow(true);
|
EditorShow(true);
|
||||||
@ -4492,7 +4503,7 @@ procedure TCustomGrid.MouseToCell(X, Y: Integer; var ACol, ARow: Longint);
|
|||||||
var
|
var
|
||||||
dummy: Integer;
|
dummy: Integer;
|
||||||
begin
|
begin
|
||||||
//TODO: Raise Exception if out of range?,
|
// Do not raise Exception if out of range
|
||||||
OffsetToColRow(True, True, X, ACol, dummy);
|
OffsetToColRow(True, True, X, ACol, dummy);
|
||||||
OffsetToColRow(False,True, Y, ARow, dummy);
|
OffsetToColRow(False,True, Y, ARow, dummy);
|
||||||
end;
|
end;
|
||||||
@ -5207,6 +5218,7 @@ procedure TCustomGrid.FixPosition;
|
|||||||
end;
|
end;
|
||||||
if not PointIgual(OldTL, FTopleft) then begin
|
if not PointIgual(OldTL, FTopleft) then begin
|
||||||
fTopLeft := OldTL;
|
fTopLeft := OldTL;
|
||||||
|
//DebugLn('TCustomGrid.FixPosition ',DbgSName(Self),' FTopLeft=',dbgs(FTopLeft));
|
||||||
topleftChanged;
|
topleftChanged;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user