You've already forked lazarus-ccr
* fpspreadsheet: fpsgrid: show hourglass when loading/saving files
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3105 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4,8 +4,7 @@ program fpsvisual;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, mainform, LResources, laz_fpspreadsheet_visual
|
Forms, mainform, LResources, laz_fpspreadsheet_visual;
|
||||||
{ you can add units after this };
|
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
@ -570,7 +570,14 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
if SaveDialog.Execute then
|
if SaveDialog.Execute then
|
||||||
|
begin
|
||||||
|
Screen.Cursor := crHourglass;
|
||||||
|
try
|
||||||
WorksheetGrid.SaveToSpreadsheetFile(SaveDialog.FileName);
|
WorksheetGrid.SaveToSpreadsheetFile(SaveDialog.FileName);
|
||||||
|
finally
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.CbBackgroundColorGetColors(Sender: TCustomColorBox; Items: TStrings);
|
procedure TForm1.CbBackgroundColorGetColors(Sender: TCustomColorBox; Items: TStrings);
|
||||||
@ -659,6 +666,8 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
// Load file
|
// Load file
|
||||||
|
Screen.Cursor := crHourglass;
|
||||||
|
try
|
||||||
WorksheetGrid.LoadFromSpreadsheetFile(UTF8ToSys(AFileName));
|
WorksheetGrid.LoadFromSpreadsheetFile(UTF8ToSys(AFileName));
|
||||||
|
|
||||||
// Update user interface
|
// Update user interface
|
||||||
@ -673,7 +682,7 @@ begin
|
|||||||
SetupBackgroundColorBox;
|
SetupBackgroundColorBox;
|
||||||
|
|
||||||
// Create a tab in the pagecontrol for each worksheet contained in the workbook
|
// Create a tab in the pagecontrol for each worksheet contained in the workbook
|
||||||
// This would be easer with a TTabControl. This has display issues, though.
|
// This would be easier with a TTabControl. This has display issues, though.
|
||||||
pages := TStringList.Create;
|
pages := TStringList.Create;
|
||||||
try
|
try
|
||||||
WorksheetGrid.GetSheets(pages);
|
WorksheetGrid.GetSheets(pages);
|
||||||
@ -687,6 +696,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
WorksheetGridSelection(nil, WorksheetGrid.Col, WorksheetGrid.Row);
|
WorksheetGridSelection(nil, WorksheetGrid.Col, WorksheetGrid.Row);
|
||||||
|
finally
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.PageControl1Change(Sender: TObject);
|
procedure TForm1.PageControl1Change(Sender: TObject);
|
||||||
|
Reference in New Issue
Block a user