mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 21:20:30 +02:00
TAChart: Improved layout in Marks form.
This commit is contained in:
parent
3f78502c54
commit
add83f5ee3
@ -322,37 +322,37 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Control = gbFont
|
AnchorSideRight.Control = gbFont
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 322
|
Left = 322
|
||||||
Height = 165
|
Height = 167
|
||||||
Top = 136
|
Top = 136
|
||||||
Width = 216
|
Width = 216
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
Caption = 'Items'
|
Caption = 'Items'
|
||||||
ClientHeight = 145
|
ClientHeight = 147
|
||||||
ClientWidth = 212
|
ClientWidth = 212
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object cbInverted: TCheckBox
|
object cbInverted: TCheckBox
|
||||||
AnchorSideLeft.Control = gbItems
|
AnchorSideLeft.Control = gbItems
|
||||||
AnchorSideTop.Control = gbItems
|
AnchorSideTop.Control = seSymbolWidth
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 6
|
Top = 120
|
||||||
Width = 63
|
Width = 63
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Inverted'
|
Caption = 'Inverted'
|
||||||
OnChange = cbInvertedChange
|
OnChange = cbInvertedChange
|
||||||
TabOrder = 0
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object seColumns: TSpinEdit
|
object seColumns: TSpinEdit
|
||||||
AnchorSideTop.Control = cbInverted
|
AnchorSideTop.Control = gbItems
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
AnchorSideRight.Control = gbItems
|
AnchorSideRight.Control = gbItems
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 108
|
Left = 108
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 33
|
Top = 8
|
||||||
Width = 96
|
Width = 96
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@ -361,19 +361,20 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
MaxValue = 1000
|
MaxValue = 1000
|
||||||
MinValue = 1
|
MinValue = 1
|
||||||
OnChange = seColumnsChange
|
OnChange = seColumnsChange
|
||||||
TabOrder = 1
|
TabOrder = 0
|
||||||
Value = 1
|
Value = 1
|
||||||
end
|
end
|
||||||
object lblColumns: TLabel
|
object lblColumns: TLabel
|
||||||
AnchorSideLeft.Control = cbInverted
|
AnchorSideLeft.Control = gbItems
|
||||||
AnchorSideTop.Control = seColumns
|
AnchorSideTop.Control = seColumns
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = seColumns
|
AnchorSideRight.Control = seColumns
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 37
|
Top = 12
|
||||||
Width = 92
|
Width = 92
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
Caption = 'Columns'
|
Caption = 'Columns'
|
||||||
FocusControl = seColumns
|
FocusControl = seColumns
|
||||||
@ -385,7 +386,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Control = cbItemFillOrder
|
AnchorSideRight.Control = cbItemFillOrder
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 64
|
Top = 39
|
||||||
Width = 92
|
Width = 92
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
@ -398,7 +399,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 108
|
Left = 108
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 60
|
Top = 35
|
||||||
Width = 96
|
Width = 96
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
@ -410,7 +411,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
'by rows'
|
'by rows'
|
||||||
)
|
)
|
||||||
OnChange = cbItemFillOrderChange
|
OnChange = cbItemFillOrderChange
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
Text = 'by columns'
|
Text = 'by columns'
|
||||||
end
|
end
|
||||||
object seSpacing: TSpinEdit
|
object seSpacing: TSpinEdit
|
||||||
@ -420,7 +421,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 108
|
Left = 108
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 87
|
Top = 62
|
||||||
Width = 96
|
Width = 96
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@ -428,7 +429,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxValue = 1000
|
MaxValue = 1000
|
||||||
OnChange = seSpacingChange
|
OnChange = seSpacingChange
|
||||||
TabOrder = 3
|
TabOrder = 2
|
||||||
Value = 20
|
Value = 20
|
||||||
end
|
end
|
||||||
object lblSpacing: TLabel
|
object lblSpacing: TLabel
|
||||||
@ -438,7 +439,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Control = seSpacing
|
AnchorSideRight.Control = seSpacing
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 91
|
Top = 66
|
||||||
Width = 92
|
Width = 92
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
@ -452,7 +453,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 108
|
Left = 108
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 114
|
Top = 89
|
||||||
Width = 96
|
Width = 96
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
@ -461,7 +462,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
MaxValue = 1000
|
MaxValue = 1000
|
||||||
OnChange = seSymbolWidthChange
|
OnChange = seSymbolWidthChange
|
||||||
TabOrder = 4
|
TabOrder = 3
|
||||||
Value = 20
|
Value = 20
|
||||||
end
|
end
|
||||||
object lblSymbolWidth: TLabel
|
object lblSymbolWidth: TLabel
|
||||||
@ -471,7 +472,7 @@ object ChartLegendFrame: TChartLegendFrame
|
|||||||
AnchorSideRight.Control = seSymbolWidth
|
AnchorSideRight.Control = seSymbolWidth
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 118
|
Top = 93
|
||||||
Width = 92
|
Width = 92
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
|
@ -9,6 +9,7 @@ object MarksForm: TMarksForm
|
|||||||
ClientHeight = 511
|
ClientHeight = 511
|
||||||
ClientWidth = 535
|
ClientWidth = 535
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
LCLVersion = '2.3.0.0'
|
LCLVersion = '2.3.0.0'
|
||||||
object ButtonPanel: TButtonPanel
|
object ButtonPanel: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
@ -42,13 +43,11 @@ object MarksForm: TMarksForm
|
|||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = Panel1
|
||||||
AnchorSideTop.Control = gbLabelFont
|
AnchorSideTop.Control = gbLabelFont
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = gbLabelFont
|
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 193
|
Height = 193
|
||||||
Top = 178
|
Top = 178
|
||||||
Width = 272
|
Width = 272
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
Caption = 'gbShapeBrushPenMargins'
|
Caption = 'gbShapeBrushPenMargins'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -88,6 +87,7 @@ object MarksForm: TMarksForm
|
|||||||
object gbLabelFont: TGroupBox
|
object gbLabelFont: TGroupBox
|
||||||
AnchorSideLeft.Control = Panel1
|
AnchorSideLeft.Control = Panel1
|
||||||
AnchorSideTop.Control = Panel1
|
AnchorSideTop.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 162
|
Height = 162
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -103,7 +103,7 @@ object MarksForm: TMarksForm
|
|||||||
AnchorSideRight.Control = gbArrow
|
AnchorSideRight.Control = gbArrow
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 296
|
Left = 296
|
||||||
Height = 113
|
Height = 117
|
||||||
Top = 275
|
Top = 275
|
||||||
Width = 207
|
Width = 207
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
@ -111,18 +111,18 @@ object MarksForm: TMarksForm
|
|||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
Caption = 'Position'
|
Caption = 'Position'
|
||||||
ClientHeight = 93
|
ClientHeight = 97
|
||||||
ClientWidth = 203
|
ClientWidth = 203
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object lblDistance: TLabel
|
object lblDistance: TLabel
|
||||||
AnchorSideLeft.Control = gbPosition
|
AnchorSideLeft.Control = gbPosition
|
||||||
AnchorSideTop.Control = seDistance
|
AnchorSideTop.Control = seDistance
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 16
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 12
|
||||||
Width = 45
|
Width = 45
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Distance'
|
Caption = 'Distance'
|
||||||
end
|
end
|
||||||
object seDistance: TSpinEdit
|
object seDistance: TSpinEdit
|
||||||
@ -131,14 +131,14 @@ object MarksForm: TMarksForm
|
|||||||
AnchorSideTop.Control = gbPosition
|
AnchorSideTop.Control = gbPosition
|
||||||
AnchorSideRight.Control = gbPosition
|
AnchorSideRight.Control = gbPosition
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 85
|
Left = 77
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 4
|
Top = 8
|
||||||
Width = 110
|
Width = 118
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 8
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
MaxValue = 1000
|
MaxValue = 1000
|
||||||
@ -149,9 +149,9 @@ object MarksForm: TMarksForm
|
|||||||
AnchorSideLeft.Control = lblDistance
|
AnchorSideLeft.Control = lblDistance
|
||||||
AnchorSideTop.Control = cmbMarkPositions
|
AnchorSideTop.Control = cmbMarkPositions
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 16
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 39
|
Top = 43
|
||||||
Width = 43
|
Width = 43
|
||||||
Caption = 'Position'
|
Caption = 'Position'
|
||||||
end
|
end
|
||||||
@ -161,10 +161,10 @@ object MarksForm: TMarksForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = seDistance
|
AnchorSideRight.Control = seDistance
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 85
|
Left = 77
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 35
|
Top = 39
|
||||||
Width = 110
|
Width = 118
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
@ -183,9 +183,9 @@ object MarksForm: TMarksForm
|
|||||||
AnchorSideLeft.Control = lblPosition
|
AnchorSideLeft.Control = lblPosition
|
||||||
AnchorSideTop.Control = cmbMarkPositions
|
AnchorSideTop.Control = cmbMarkPositions
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 16
|
Left = 8
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 66
|
Top = 70
|
||||||
Width = 112
|
Width = 112
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
|
@ -30,6 +30,7 @@ type
|
|||||||
procedure cbMarksCenteredChange(Sender: TObject);
|
procedure cbMarksCenteredChange(Sender: TObject);
|
||||||
procedure cmbMarkPositionsChange(Sender: TObject);
|
procedure cmbMarkPositionsChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
procedure seDistanceChange(Sender: TObject);
|
procedure seDistanceChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
FSeries: TChartSeries;
|
FSeries: TChartSeries;
|
||||||
@ -39,10 +40,8 @@ type
|
|||||||
FArrowFrame: TChartArrowFrame;
|
FArrowFrame: TChartArrowFrame;
|
||||||
function GetChart: TChart;
|
function GetChart: TChart;
|
||||||
procedure ShapeChangedHandler(AShape: TChartLabelShape);
|
procedure ShapeChangedHandler(AShape: TChartLabelShape);
|
||||||
|
|
||||||
public
|
public
|
||||||
procedure Prepare(ASeries: TChartSeries);
|
procedure Prepare(ASeries: TChartSeries);
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -53,7 +52,7 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
TASeries,
|
Math, TASeries,
|
||||||
ceUtils;
|
ceUtils;
|
||||||
|
|
||||||
|
|
||||||
@ -82,9 +81,7 @@ begin
|
|||||||
FFontFrame := TChartFontFrame.Create(self);
|
FFontFrame := TChartFontFrame.Create(self);
|
||||||
FFontFrame.Name := '';
|
FFontFrame.Name := '';
|
||||||
FFontFrame.Align := alClient;
|
FFontFrame.Align := alClient;
|
||||||
FFontFrame.BorderSpacing.Left := 16;
|
FFontFrame.BorderSpacing.Around := 8;
|
||||||
FFontFrame.BorderSpacing.Right := 8;
|
|
||||||
FFontFrame.BorderSpacing.Bottom := 8;
|
|
||||||
FFontFrame.AutoSize := true;
|
FFontFrame.AutoSize := true;
|
||||||
FFontFrame.Parent := gbLabelFont;
|
FFontFrame.Parent := gbLabelFont;
|
||||||
gbLabelFont.AutoSize := true;
|
gbLabelFont.AutoSize := true;
|
||||||
@ -93,10 +90,7 @@ begin
|
|||||||
FShapeBrushPenMarginsFrame := TChartShapeBrushPenMarginsFrame.Create(self);
|
FShapeBrushPenMarginsFrame := TChartShapeBrushPenMarginsFrame.Create(self);
|
||||||
FShapeBrushPenMarginsFrame.Name := '';
|
FShapeBrushPenMarginsFrame.Name := '';
|
||||||
FShapeBrushPenMarginsFrame.Align := alClient;
|
FShapeBrushPenMarginsFrame.Align := alClient;
|
||||||
FShapeBrushPenMarginsFrame.BorderSpacing.Left := 16;
|
FShapeBrushPenMarginsFrame.BorderSpacing.Around := 8;
|
||||||
FShapeBrushPenMarginsFrame.BorderSpacing.Right := 8;
|
|
||||||
FShapeBrushPenMarginsFrame.BorderSpacing.Bottom := 8;
|
|
||||||
// FShapeBrushPenMarginsFrame.OnChange := @ChangedHandler;
|
|
||||||
FShapeBrushPenMarginsFrame.OnShapeChange := @ShapeChangedHandler;
|
FShapeBrushPenMarginsFrame.OnShapeChange := @ShapeChangedHandler;
|
||||||
FShapeBrushPenMarginsFrame.AutoSize := true;
|
FShapeBrushPenMarginsFrame.AutoSize := true;
|
||||||
FShapeBrushPenMarginsFrame.Parent := gbShapeBrushPenMargins;
|
FShapeBrushPenMarginsFrame.Parent := gbShapeBrushPenMargins;
|
||||||
@ -106,9 +100,7 @@ begin
|
|||||||
FLinkPenFrame := TSimpleChartPenFrame.Create(self);
|
FLinkPenFrame := TSimpleChartPenFrame.Create(self);
|
||||||
FLinkPenFrame.Name := '';
|
FLinkPenFrame.Name := '';
|
||||||
FLinkPenFrame.Align := alClient;
|
FLinkPenFrame.Align := alClient;
|
||||||
FLinkPenFrame.BorderSpacing.Left := 16;
|
FLinkPenFrame.BorderSpacing.Around := 8;
|
||||||
FLinkPenFrame.BorderSpacing.Right := 8;
|
|
||||||
FLinkPenFrame.BorderSpacing.Bottom := 8;
|
|
||||||
FLinkPenFrame.AutoSize := true;
|
FLinkPenFrame.AutoSize := true;
|
||||||
FLinkPenFrame.Parent := gbLinkPen;
|
FLinkPenFrame.Parent := gbLinkPen;
|
||||||
gbLinkPen.AutoSize := true;
|
gbLinkPen.AutoSize := true;
|
||||||
@ -117,9 +109,7 @@ begin
|
|||||||
FArrowFrame := TChartArrowFrame.Create(self);
|
FArrowFrame := TChartArrowFrame.Create(self);
|
||||||
FArrowFrame.Name := '';
|
FArrowFrame.Name := '';
|
||||||
FArrowFrame.Align := alClient;
|
FArrowFrame.Align := alClient;
|
||||||
FArrowFrame.BorderSpacing.Left := 16;
|
FArrowFrame.BorderSpacing.Around := 8;
|
||||||
FArrowFrame.BorderSpacing.Right := 8;
|
|
||||||
FArrowFrame.BorderSpacing.Bottom := 8;
|
|
||||||
FArrowFrame.AutoSize := true;
|
FArrowFrame.AutoSize := true;
|
||||||
FArrowFrame.Parent := gbArrow;
|
FArrowFrame.Parent := gbArrow;
|
||||||
gbArrow.AutoSize := true;
|
gbArrow.AutoSize := true;
|
||||||
@ -130,6 +120,37 @@ begin
|
|||||||
BoldHeaders(self);
|
BoldHeaders(self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMarksForm.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
wf: Integer = 0;
|
||||||
|
hf: Integer = 0;
|
||||||
|
ws: Integer = 0;
|
||||||
|
hs: Integer = 0;
|
||||||
|
begin
|
||||||
|
FFontFrame.GetPreferredsize(wf, hf);
|
||||||
|
inc(wf, 2 * FLinkPenFrame.BorderSpacing.Around);
|
||||||
|
inc(hf, 2 * FLinkPenFrame.BorderSpacing.Around);
|
||||||
|
// inc(wf, FLinkPenFrame.BorderSpacing.Left + FLinkPenFrame.BorderSpacing.Right);
|
||||||
|
// inc(hf, FLinkPenFrame.BorderSpacing.Top + FLinkPenFrame.BorderSpacing.Bottom);
|
||||||
|
|
||||||
|
FShapeBrushPenMarginsFrame.GetPreferredSize(ws, hs);
|
||||||
|
inc(ws, 2 * FShapeBrushPenMarginsFrame.BorderSpacing.Around);
|
||||||
|
inc(hs, 2 * FShapeBrushPenMarginsFrame.BorderSpacing.Around);
|
||||||
|
// inc(ws, FShapeBrushPenMarginsFrame.BorderSpacing.Left + FShapeBrushPenMarginsFrame.BorderSpacing.Right);
|
||||||
|
// inc(hs, FShapeBrushPenMarginsFrame.BorderSpacing.Top + FShapeBrushPenMarginsFrame.BorderSpacing.Bottom);
|
||||||
|
|
||||||
|
if wf > ws then begin
|
||||||
|
gbShapeBrushPenMargins.AnchorSideRight.Control := gbLabelFont;
|
||||||
|
gbShapeBrushPenMargins.AnchorSideRight.Side := asrRight;
|
||||||
|
gbShapeBrushPenMargins.Anchors := gbShapeBrushPenMargins.Anchors + [akRight];
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
gbLabelFont.AnchorSideRight.Control := gbShapeBrushPenMargins;
|
||||||
|
gbLabelFont.AnchorSideRight.Side := asrRight;
|
||||||
|
gbLabelFont.Anchors := gbLabelFont.Anchors + [akRight];
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TMarksForm.GetChart: TChart;
|
function TMarksForm.GetChart: TChart;
|
||||||
begin
|
begin
|
||||||
Result := FSeries.ParentChart;
|
Result := FSeries.ParentChart;
|
||||||
|
@ -2,9 +2,9 @@ object SimpleChartPenFrame: TSimpleChartPenFrame
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 62
|
Height = 62
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 124
|
Width = 120
|
||||||
ClientHeight = 62
|
ClientHeight = 62
|
||||||
ClientWidth = 124
|
ClientWidth = 120
|
||||||
OnResize = FrameResize
|
OnResize = FrameResize
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
DesignLeft = 620
|
DesignLeft = 620
|
||||||
@ -26,7 +26,6 @@ object SimpleChartPenFrame: TSimpleChartPenFrame
|
|||||||
AnchorSideLeft.Control = cbVisible
|
AnchorSideLeft.Control = cbVisible
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
AnchorSideRight.Control = Owner
|
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 62
|
Left = 62
|
||||||
Height = 25
|
Height = 25
|
||||||
@ -51,7 +50,7 @@ object SimpleChartPenFrame: TSimpleChartPenFrame
|
|||||||
Left = 40
|
Left = 40
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 84
|
Width = 80
|
||||||
Mode = ccmPenWidth
|
Mode = ccmPenWidth
|
||||||
Options = [ccoPatternBrush, ccoPatternPen]
|
Options = [ccoPatternBrush, ccoPatternPen]
|
||||||
PenPattern = '1|1'
|
PenPattern = '1|1'
|
||||||
|
Loading…
Reference in New Issue
Block a user