From 2c01d20390c92d53293a665005747106bb9d1372 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Tue, 17 May 2016 11:47:17 +0000 Subject: [PATCH] fpspreadsheet: Undo prev fix of compilation error because it is fixed in grids.pas now. Update title style of TsWorksheetGrid for Win10. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4653 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/examples/visual/fpsctrls/main.lfm | 5 +++-- components/fpspreadsheet/examples/visual/fpsctrls/main.pas | 7 ++++++- components/fpspreadsheet/fpspreadsheetgrid.pas | 6 +----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/components/fpspreadsheet/examples/visual/fpsctrls/main.lfm b/components/fpspreadsheet/examples/visual/fpsctrls/main.lfm index ca764cffc..c9d5ce4d5 100644 --- a/components/fpspreadsheet/examples/visual/fpsctrls/main.lfm +++ b/components/fpspreadsheet/examples/visual/fpsctrls/main.lfm @@ -349,7 +349,7 @@ object MainForm: TMainForm CellFormatItem = cfiFontName WorkbookSource = WorkbookSource DropDownCount = 24 - ItemIndex = 91 + ItemIndex = 44 TabOrder = 0 Text = 'Arial' end @@ -619,8 +619,9 @@ object MainForm: TMainForm Left = 144 Height = 24 Top = 0 - Width = 853 + Width = 851 Align = alClient + BorderSpacing.Right = 2 BorderSpacing.Bottom = 2 TabOrder = 1 WantReturns = False diff --git a/components/fpspreadsheet/examples/visual/fpsctrls/main.pas b/components/fpspreadsheet/examples/visual/fpsctrls/main.pas index 11f364e66..5cdc20d26 100644 --- a/components/fpspreadsheet/examples/visual/fpsctrls/main.pas +++ b/components/fpspreadsheet/examples/visual/fpsctrls/main.pas @@ -407,7 +407,7 @@ implementation {$R *.lfm} uses - LCLIntf, inifiles, uriparser, + LCLIntf, inifiles, uriparser, Grids, fpsUtils, fpsCSV, sCSVParamsForm, sCurrencyForm, sFormatSettingsForm, sSortParamsForm, sHyperlinkForm, sNumFormatForm, sSearchForm; @@ -732,6 +732,11 @@ begin AcFileSaveAs.Dialog.Filter := GetFileFormatFilter('|', ';', faWrite, priorityFormats); FSaveFormats := GetSpreadFormats(faWrite, priorityFormats); + + {$IFDEF WINDOWS} + if Win32MajorVersion >= 10 then + WorksheetGrid.TitleStyle := tsLazarus; + {$ENDIF} end; { Event handler for hyperlinks: it only has to provide the hyperlink data diff --git a/components/fpspreadsheet/fpspreadsheetgrid.pas b/components/fpspreadsheet/fpspreadsheetgrid.pas index 0c67dabc2..24f4d7cd4 100644 --- a/components/fpspreadsheet/fpspreadsheetgrid.pas +++ b/components/fpspreadsheet/fpspreadsheetgrid.pas @@ -707,7 +707,7 @@ procedure Register; implementation uses - Types, LCLType, LCLIntf, LCLProc, LCLVersion, Math, StrUtils, + Types, LCLType, LCLIntf, LCLProc, Math, StrUtils, fpCanvas, fpsStrings, fpsUtils, fpsVisualUtils, fpsHTMLUtils, fpsNumFormat; @@ -3999,11 +3999,7 @@ begin AutoExpandToRow(grow, aeNavigation); AutoExpandToCol(gcol, aeNavigation); if (grow <> Row) or (gcol <> Col) then - {$IF LCL_FULLVERSION < 1070000} MoveExtend(false, gcol, grow); - {$ELSE} - MoveExtend(false, gcol, grow, true); - {$ENDIF} end; // Abort selection because of an error