spready: Adapt to recent Align changes of child controls in TToolbar

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6628 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-08-30 15:40:32 +00:00
parent 02e90b8949
commit 0ef3a22138
3 changed files with 56 additions and 52 deletions

View File

@ -16,8 +16,8 @@ object MainForm: TMainForm
LCLVersion = '1.9.0.0' LCLVersion = '1.9.0.0'
object WorkbookTabControl: TsWorkbookTabControl object WorkbookTabControl: TsWorkbookTabControl
Left = 0 Left = 0
Height = 606 Height = 609
Top = 83 Top = 80
Width = 792 Width = 792
TabIndex = 0 TabIndex = 0
Tabs.Strings = ( Tabs.Strings = (
@ -28,11 +28,12 @@ object MainForm: TMainForm
WorkbookSource = WorkbookSource WorkbookSource = WorkbookSource
object WorksheetGrid: TsWorksheetGrid object WorksheetGrid: TsWorksheetGrid
Left = 2 Left = 2
Height = 581 Height = 584
Top = 23 Top = 23
Width = 788 Width = 788
AutoCalc = True AutoCalc = True
EditorLineMode = elmMultiLine EditorLineMode = elmMultiLine
FixedColWidth = 57
FrozenCols = 0 FrozenCols = 0
FrozenRows = 0 FrozenRows = 0
ReadFormulas = True ReadFormulas = True
@ -59,8 +60,8 @@ object MainForm: TMainForm
end end
object InspectorTabControl: TTabControl object InspectorTabControl: TTabControl
Left = 797 Left = 797
Height = 606 Height = 609
Top = 83 Top = 80
Width = 323 Width = 323
MultiLine = True MultiLine = True
OnChange = InspectorTabControlChange OnChange = InspectorTabControlChange
@ -78,7 +79,7 @@ object MainForm: TMainForm
Visible = False Visible = False
object Inspector: TsSpreadsheetInspector object Inspector: TsSpreadsheetInspector
Left = 2 Left = 2
Height = 561 Height = 564
Top = 43 Top = 43
Width = 319 Width = 319
Align = alClient Align = alClient
@ -98,11 +99,11 @@ object MainForm: TMainForm
'Options=boAutoCalc, boCalcBeforeSaving, boReadFormulas' 'Options=boAutoCalc, boCalcBeforeSaving, boReadFormulas'
'(-) FormatSettings=' '(-) FormatSettings='
' ThousandSeparator=.' ' ThousandSeparator=.'
' DecimalSeparator=,' ' DecimalSeparator=.'
' ListSeparator=;' ' ListSeparator=;'
' DateSeparator=.' ' DateSeparator=.'
' TimeSeparator=:' ' TimeSeparator=:'
' ShortDateFormat=dd.MM.yyyy' ' ShortDateFormat=MM.yy'
' LongDateFormat=dddd, d. MMMM yyyy' ' LongDateFormat=dddd, d. MMMM yyyy'
' ShortTimeFormat=hh:nn' ' ShortTimeFormat=hh:nn'
' LongTimeFormat=hh:nn:ss' ' LongTimeFormat=hh:nn:ss'
@ -146,8 +147,8 @@ object MainForm: TMainForm
end end
object InspectorSplitter: TSplitter object InspectorSplitter: TSplitter
Left = 792 Left = 792
Height = 606 Height = 609
Top = 83 Top = 80
Width = 5 Width = 5
Align = alRight Align = alRight
ResizeAnchor = akRight ResizeAnchor = akRight
@ -602,65 +603,64 @@ object MainForm: TMainForm
Action = AcFileNew Action = AcFileNew
end end
end end
object ToolBar3: TToolBar object Splitter3: TSplitter
Cursor = crVSplit
Left = 0 Left = 0
Height = 28 Height = 5
Top = 75
Width = 1120
Align = alTop
ResizeAnchor = akTop
end
object Panel3: TPanel
Left = 0
Height = 25
Top = 50 Top = 50
Width = 1120 Width = 1120
AutoSize = True Align = alTop
Caption = 'ToolBar3' BevelOuter = bvNone
Constraints.MinHeight = 28 ClientHeight = 25
EdgeBorders = [ebBottom] ClientWidth = 1120
TabOrder = 5 TabOrder = 6
OnResize = ToolBar3Resize
object Panel2: TPanel object Panel2: TPanel
Left = 1 Left = 2
Height = 26 Height = 25
Top = 0 Top = 0
Width = 138 Width = 150
Align = alLeft Align = alLeft
BorderSpacing.Left = 2
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 26 ClientHeight = 25
ClientWidth = 138 ClientWidth = 150
TabOrder = 0 TabOrder = 0
object CellIndicator: TsCellIndicator object CellIndicator: TsCellIndicator
Left = 0 Left = 0
Height = 23 Height = 23
Top = 0 Top = 0
Width = 138 Width = 150
WorkbookSource = WorkbookSource WorkbookSource = WorkbookSource
Align = alTop Align = alTop
TabOrder = 0 TabOrder = 0
Text = 'A1' Text = 'A1'
end end
end end
object CellEdit: TsCellEdit
AnchorSideRight.Side = asrBottom
Left = 144
Height = 23
Top = 0
Width = 852
Align = alClient
BorderSpacing.Right = 2
BorderSpacing.Bottom = 3
TabOrder = 1
WorkbookSource = WorkbookSource
end
object Splitter2: TSplitter object Splitter2: TSplitter
Left = 139 Left = 152
Height = 26 Height = 25
Top = 0 Top = 0
Width = 5 Width = 5
end end
end object CellEdit: TsCellEdit
object Splitter3: TSplitter AnchorSideRight.Side = asrBottom
Cursor = crVSplit Left = 157
Left = 0 Height = 23
Height = 5 Top = 0
Top = 78 Width = 963
Width = 1120 Align = alClient
Align = alTop BorderSpacing.Bottom = 2
ResizeAnchor = akTop TabOrder = 2
WorkbookSource = WorkbookSource
end
end end
object WorkbookSource: TsWorkbookSource object WorkbookSource: TsWorkbookSource
AutoDetectFormat = False AutoDetectFormat = False

View File

@ -6,9 +6,9 @@ interface
uses uses
Classes, SysUtils, FileUtil, mrumanager, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, FileUtil, mrumanager, Forms, Controls, Graphics, Dialogs,
ExtCtrls, ComCtrls, ActnList, Menus, StdActns, Buttons, Grids, types, ExtCtrls, ComCtrls, ActnList, Menus, StdActns, Buttons, Grids, StdCtrls,
fpstypes, fpspreadsheet, fpspreadsheetctrls, fpspreadsheetgrid, fpsActions, types, fpstypes, fpspreadsheet, fpspreadsheetctrls, fpspreadsheetgrid,
fpsAllFormats, fpsSYLK, xlsxml, xlsxooxml_crypto; fpsActions, fpsAllFormats, fpsSYLK, xlsxml, xlsxooxml_crypto;
// NOTE: // NOTE:
// In order to use the decrypting xlsx reader put xlsxooxlm_cryto after // In order to use the decrypting xlsx reader put xlsxooxlm_cryto after
// xlsxooxml or fpsAllforamts. // xlsxooxml or fpsAllforamts.
@ -282,6 +282,7 @@ type
AcNumFormatCurrency: TsNumberFormatAction; AcNumFormatCurrency: TsNumberFormatAction;
AcNumFormatCurrencyRed: TsNumberFormatAction; AcNumFormatCurrencyRed: TsNumberFormatAction;
Panel2: TPanel; Panel2: TPanel;
Panel3: TPanel;
PuCellProtection: TPopupMenu; PuCellProtection: TPopupMenu;
PuRecentFiles: TPopupMenu; PuRecentFiles: TPopupMenu;
PuPaste: TPopupMenu; PuPaste: TPopupMenu;
@ -363,7 +364,6 @@ type
AcZoom500: TsWorksheetZoomAction; AcZoom500: TsWorksheetZoomAction;
AcZoomMore: TsWorksheetZoomAction; AcZoomMore: TsWorksheetZoomAction;
ToolBar2: TToolBar; ToolBar2: TToolBar;
ToolBar3: TToolBar;
ToolButton1: TToolButton; ToolButton1: TToolButton;
ToolButton11: TToolButton; ToolButton11: TToolButton;
ToolButton12: TToolButton; ToolButton12: TToolButton;
@ -1112,6 +1112,9 @@ begin
AcFileSaveAs.Dialog.Filter := GetFileFormatFilter('|', ';', faWrite, priorityFormats); AcFileSaveAs.Dialog.Filter := GetFileFormatFilter('|', ';', faWrite, priorityFormats);
FSaveFormats := GetSpreadFormats(faWrite, priorityFormats); FSaveFormats := GetSpreadFormats(faWrite, priorityFormats);
Panel2.Height := CellIndicator.Height + 2;
Panel3.Constraints.MinHeight := CellIndicator.Height + 2;
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
if Win32MajorVersion >= 10 then begin if Win32MajorVersion >= 10 then begin
// avoid the ugly themed grid of Win10... // avoid the ugly themed grid of Win10...
@ -1173,7 +1176,7 @@ end;
procedure TMainForm.ToolBar3Resize(Sender: TObject); procedure TMainForm.ToolBar3Resize(Sender: TObject);
begin begin
CellEdit.Width := ToolBar3.ClientWidth - CellEdit.Left - 4; // CellEdit.Width := ToolBar3.ClientWidth - CellEdit.Left - 4;
end; end;
procedure TMainForm.LoadFile(const AFileName: String); procedure TMainForm.LoadFile(const AFileName: String);

View File

@ -175,6 +175,7 @@
<Filename Value="szoomform.pas"/> <Filename Value="szoomform.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="ZoomForm"/> <ComponentName Value="ZoomForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="sZoomForm"/> <UnitName Value="sZoomForm"/>
</Unit15> </Unit15>