You've already forked lazarus-ccr
Improves FPSpreadsheet examples
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1213 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
49
components/fpspreadsheet/examples/fpsgrid/mainform.pas
Normal file
49
components/fpspreadsheet/examples/fpsgrid/mainform.pas
Normal file
@ -0,0 +1,49 @@
|
||||
unit mainform;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, fpspreadsheetgrid, fpspreadsheet;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
buttonPopulateGrid: TButton;
|
||||
sWorksheetGrid1: TsWorksheetGrid;
|
||||
procedure buttonPopulateGridClick(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.buttonPopulateGridClick(Sender: TObject);
|
||||
var
|
||||
lWorksheet: TsWorksheet;
|
||||
begin
|
||||
lWorksheet := TsWorksheet.Create;
|
||||
try
|
||||
lWorksheet.WriteUTF8Text(2, 2, 'Algo');
|
||||
sWorksheetGrid1.LoadFromWorksheet(lWorksheet);
|
||||
finally
|
||||
lWorksheet.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I mainform.lrs}
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user