You've already forked lazarus-ccr
lazspreadsheet: Adds a label to show the coordinates of the current cell
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2675 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8,7 +8,6 @@
|
||||
<Title Value="lazspreadsheet"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
|
Binary file not shown.
@ -37,7 +37,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
end
|
||||
object editSourceFile: TFileNameEdit
|
||||
Left = 136
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 8
|
||||
Width = 136
|
||||
DialogOptions = []
|
||||
@ -52,7 +52,7 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 14
|
||||
Width = 116
|
||||
Width = 106
|
||||
Caption = 'Source Spreadsheet:'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -76,5 +76,13 @@ object lazfpsmainform: Tlazfpsmainform
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 3
|
||||
end
|
||||
object labelCurCell: TLabel
|
||||
Left = 8
|
||||
Height = 15
|
||||
Top = 40
|
||||
Width = 66
|
||||
Caption = 'Current Cell:'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -20,6 +20,7 @@ type
|
||||
btnLoadSpreadsheet: TButton;
|
||||
buttonReadCellInfo: TButton;
|
||||
editSourceFile: TFileNameEdit;
|
||||
labelCurCell: TLabel;
|
||||
Label2: TLabel;
|
||||
memoCellData: TMemo;
|
||||
pagesSheets: TPageControl;
|
||||
@ -30,6 +31,7 @@ type
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
procedure HandleSelectionChanged(Sender: TObject; aCol, aRow: Integer);
|
||||
public
|
||||
{ public declarations }
|
||||
Worksheets: array of TsWorksheetGrid;
|
||||
@ -72,6 +74,7 @@ begin
|
||||
Worksheets[i].Align := alClient;
|
||||
//Worksheets[i].Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
|
||||
Worksheets[i].LoadFromWorksheet(lCurWorksheet);
|
||||
Worksheets[i].OnSelection := @HandleSelectionChanged;
|
||||
lCurPage.Caption := lCurWorksheet.Name;
|
||||
end;
|
||||
end;
|
||||
@ -124,5 +127,11 @@ begin
|
||||
Workbook.Free;
|
||||
end;
|
||||
|
||||
procedure Tlazfpsmainform.HandleSelectionChanged(Sender: TObject; aCol,
|
||||
aRow: Integer);
|
||||
begin
|
||||
labelCurCell.Caption := Format('Current Cell: Row=%d Col=%d', [ARow, ACol]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Reference in New Issue
Block a user