mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 14:59:41 +02:00
LCL, allow StringGrid to copy current select range in addition to whole grid
git-svn-id: trunk@23901 -
This commit is contained in:
parent
0374dc7a00
commit
e41a4b5a78
@ -12507,7 +12507,11 @@ Segunda linea de texto</descr>
|
||||
</element>
|
||||
<element name="TCustomStringGrid.CopyToClipboard">
|
||||
<short>
|
||||
<var>CopyToClipboard</var> - copy the selected text to the clipboard</short>
|
||||
<var>CopyToClipboard</var> - copy a range of cells to clipboard</short>
|
||||
<descr>This method will copy a range of cells into the clipboard, the cells values are TAB separated.
|
||||
|
||||
The range is defined based on optional <var>AUseSelection</var> parameter which is false by default and which means the range is set to the whole grid, including fixed cols/rows. If <var>AUseSelection</var> is true, the range of cells is set to current <link id="TCustomGrid.Selection"/>
|
||||
</descr>
|
||||
</element>
|
||||
<topic name="HowToUseGrids">
|
||||
<short>How to use <var>Grids</var> including <var>StringGrids</var>, <var>DrawGrids</var> and <var>DbGrids</var>
|
||||
|
@ -1430,7 +1430,7 @@ type
|
||||
procedure Clean(CleanOptions: TGridZoneSet); overload;
|
||||
procedure Clean(aRect: TRect; CleanOptions: TGridZoneSet); overload;
|
||||
procedure Clean(StartCol,StartRow,EndCol,EndRow: integer; CleanOptions: TGridZoneSet); overload;
|
||||
procedure CopyToClipboard;
|
||||
procedure CopyToClipboard(AUseSelection: boolean = false);
|
||||
property Cells[ACol, ARow: Integer]: string read GetCells write SetCells;
|
||||
property Cols[index: Integer]: TStrings read GetCols write SetCols;
|
||||
property DefaultTextStyle;
|
||||
@ -9086,9 +9086,12 @@ begin
|
||||
EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TCustomStringGrid.CopyToClipboard;
|
||||
procedure TCustomStringGrid.CopyToClipboard(AUseSelection: boolean = false);
|
||||
begin
|
||||
CopyCellRectToClipboard(Rect(0,0,ColCount-1,RowCount-1));
|
||||
if AUseSelection then
|
||||
doCopyToClipboard
|
||||
else
|
||||
CopyCellRectToClipboard(Rect(0,0,ColCount-1,RowCount-1));
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user