mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-29 08:42:50 +02:00
TAChart/ChartEditorDemo: Move controls of TitleFootDlg to a new TChartTitleFootFrame unit.
git-svn-id: trunk@65035 -
This commit is contained in:
parent
3266c2537c
commit
72963f6adb
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -5180,6 +5180,8 @@ components/tachart/demo/charteditor/ceshapebrushpenmarginsframe.lfm svneol=nativ
|
|||||||
components/tachart/demo/charteditor/ceshapebrushpenmarginsframe.pas svneol=native#text/pascal
|
components/tachart/demo/charteditor/ceshapebrushpenmarginsframe.pas svneol=native#text/pascal
|
||||||
components/tachart/demo/charteditor/cetitlefootdlg.lfm svneol=native#text/plain
|
components/tachart/demo/charteditor/cetitlefootdlg.lfm svneol=native#text/plain
|
||||||
components/tachart/demo/charteditor/cetitlefootdlg.pas svneol=native#text/pascal
|
components/tachart/demo/charteditor/cetitlefootdlg.pas svneol=native#text/pascal
|
||||||
|
components/tachart/demo/charteditor/cetitlefootframe.lfm svneol=native#text/plain
|
||||||
|
components/tachart/demo/charteditor/cetitlefootframe.pas svneol=native#text/pascal
|
||||||
components/tachart/demo/charteditor/ceutils.pas svneol=native#text/pascal
|
components/tachart/demo/charteditor/ceutils.pas svneol=native#text/pascal
|
||||||
components/tachart/demo/charteditor/charteditordemo.lpi svneol=native#text/xml
|
components/tachart/demo/charteditor/charteditordemo.lpi svneol=native#text/xml
|
||||||
components/tachart/demo/charteditor/charteditordemo.lpr svneol=native#text/pascal
|
components/tachart/demo/charteditor/charteditordemo.lpr svneol=native#text/pascal
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
object ChartShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 237
|
Height = 237
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 263
|
Width = 227
|
||||||
ClientHeight = 237
|
ClientHeight = 237
|
||||||
ClientWidth = 263
|
ClientWidth = 227
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
DesignLeft = 1498
|
DesignLeft = 1498
|
||||||
DesignTop = 388
|
DesignTop = 388
|
||||||
@ -17,7 +17,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 263
|
Width = 227
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
Enabled = False
|
Enabled = False
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
@ -43,14 +43,14 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 54
|
Height = 54
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 124
|
Width = 106
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
Caption = 'Background'
|
Caption = 'Background'
|
||||||
ClientHeight = 34
|
ClientHeight = 34
|
||||||
ClientWidth = 120
|
ClientWidth = 102
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object cbFilled: TCheckBox
|
object cbFilled: TCheckBox
|
||||||
AnchorSideLeft.Control = gbBackground
|
AnchorSideLeft.Control = gbBackground
|
||||||
@ -60,7 +60,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
Left = 10
|
Left = 10
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 62
|
Width = 44
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 10
|
BorderSpacing.Left = 10
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -74,7 +74,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideTop.Control = gbBackground
|
AnchorSideTop.Control = gbBackground
|
||||||
AnchorSideRight.Control = gbBackground
|
AnchorSideRight.Control = gbBackground
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 80
|
Left = 62
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 32
|
Width = 32
|
||||||
@ -97,16 +97,16 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = gbBackground
|
AnchorSideBottom.Control = gbBackground
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 139
|
Left = 121
|
||||||
Height = 54
|
Height = 54
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 124
|
Width = 106
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Border'
|
Caption = 'Border'
|
||||||
ClientHeight = 34
|
ClientHeight = 34
|
||||||
ClientWidth = 120
|
ClientWidth = 102
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object cbShowBorder: TCheckBox
|
object cbShowBorder: TCheckBox
|
||||||
AnchorSideLeft.Control = gbBorder
|
AnchorSideLeft.Control = gbBorder
|
||||||
@ -116,7 +116,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
Left = 10
|
Left = 10
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 3
|
Top = 3
|
||||||
Width = 68
|
Width = 50
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 10
|
BorderSpacing.Left = 10
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -129,7 +129,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideTop.Control = gbBorder
|
AnchorSideTop.Control = gbBorder
|
||||||
AnchorSideRight.Control = gbBorder
|
AnchorSideRight.Control = gbBorder
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 82
|
Left = 64
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 30
|
Width = 30
|
||||||
@ -155,19 +155,19 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 97
|
Height = 97
|
||||||
Top = 93
|
Top = 93
|
||||||
Width = 263
|
Width = 227
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Margins'
|
Caption = 'Margins'
|
||||||
ClientHeight = 77
|
ClientHeight = 77
|
||||||
ClientWidth = 259
|
ClientWidth = 223
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object seTopMargin: TSpinEdit
|
object seTopMargin: TSpinEdit
|
||||||
AnchorSideLeft.Control = gbMargins
|
AnchorSideLeft.Control = gbMargins
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = gbMargins
|
AnchorSideTop.Control = gbMargins
|
||||||
Left = 104
|
Left = 86
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 50
|
Width = 50
|
||||||
@ -179,13 +179,13 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideTop.Control = seTopMargin
|
AnchorSideTop.Control = seTopMargin
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = seTopMargin
|
AnchorSideRight.Control = seTopMargin
|
||||||
Left = 46
|
Left = 28
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 50
|
Width = 50
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
BorderSpacing.Left = 32
|
BorderSpacing.Left = 28
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
OnChange = seLeftMarginChange
|
OnChange = seLeftMarginChange
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -195,13 +195,13 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = seTopMargin
|
AnchorSideTop.Control = seTopMargin
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 162
|
Left = 144
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 50
|
Width = 50
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Right = 32
|
BorderSpacing.Right = 28
|
||||||
OnChange = seRightMarginChange
|
OnChange = seRightMarginChange
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
@ -212,7 +212,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideBottom.Control = gbMargins
|
AnchorSideBottom.Control = gbMargins
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 104
|
Left = 86
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 46
|
Top = 46
|
||||||
Width = 50
|
Width = 50
|
||||||
@ -227,7 +227,7 @@ object ShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame
|
|||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = cmbShape
|
AnchorSideTop.Control = cmbShape
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 131
|
Left = 113
|
||||||
Height = 50
|
Height = 50
|
||||||
Top = 23
|
Top = 23
|
||||||
Width = 1
|
Width = 1
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
object TitleFootEditor: TChartTitleFootEditor
|
object ChartTitleFootEditor: TChartTitleFootEditor
|
||||||
Left = 608
|
Left = 579
|
||||||
Height = 357
|
Height = 357
|
||||||
Top = 235
|
Top = 298
|
||||||
Width = 561
|
Width = 561
|
||||||
ActiveControl = cbShow
|
|
||||||
Caption = 'Title/footer editor'
|
Caption = 'Title/footer editor'
|
||||||
ClientHeight = 357
|
ClientHeight = 357
|
||||||
ClientWidth = 561
|
ClientWidth = 561
|
||||||
@ -11,7 +10,6 @@ object TitleFootEditor: TChartTitleFootEditor
|
|||||||
OnCloseQuery = FormCloseQuery
|
OnCloseQuery = FormCloseQuery
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.1.0.0'
|
||||||
object ButtonPanel: TButtonPanel
|
object ButtonPanel: TButtonPanel
|
||||||
@ -28,151 +26,8 @@ object TitleFootEditor: TChartTitleFootEditor
|
|||||||
CloseButton.DefaultCaption = True
|
CloseButton.DefaultCaption = True
|
||||||
CancelButton.Name = 'CancelButton'
|
CancelButton.Name = 'CancelButton'
|
||||||
CancelButton.DefaultCaption = True
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 3
|
TabOrder = 0
|
||||||
ShowButtons = [pbOK, pbCancel]
|
ShowButtons = [pbOK, pbCancel]
|
||||||
ShowGlyphs = [pbOK, pbCancel, pbClose]
|
ShowGlyphs = [pbOK, pbCancel, pbClose]
|
||||||
end
|
end
|
||||||
object ParamsPanel: TPanel
|
|
||||||
Left = 8
|
|
||||||
Height = 187
|
|
||||||
Top = 122
|
|
||||||
Width = 545
|
|
||||||
Align = alBottom
|
|
||||||
BorderSpacing.Around = 8
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 187
|
|
||||||
ClientWidth = 545
|
|
||||||
TabOrder = 2
|
|
||||||
object rgAlignment: TRadioGroup
|
|
||||||
AnchorSideLeft.Control = ParamsPanel
|
|
||||||
AnchorSideTop.Control = ParamsPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 0
|
|
||||||
Height = 51
|
|
||||||
Top = 0
|
|
||||||
Width = 211
|
|
||||||
AutoFill = True
|
|
||||||
AutoSize = True
|
|
||||||
Caption = 'Alignment'
|
|
||||||
ChildSizing.LeftRightSpacing = 16
|
|
||||||
ChildSizing.TopBottomSpacing = 6
|
|
||||||
ChildSizing.HorizontalSpacing = 16
|
|
||||||
ChildSizing.EnlargeHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.EnlargeVertical = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
|
||||||
ChildSizing.ControlsPerLine = 3
|
|
||||||
ClientHeight = 31
|
|
||||||
ClientWidth = 207
|
|
||||||
Columns = 3
|
|
||||||
ItemIndex = 0
|
|
||||||
Items.Strings = (
|
|
||||||
'Left'
|
|
||||||
'Center'
|
|
||||||
'Right'
|
|
||||||
)
|
|
||||||
OnClick = rgAlignmentClick
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object gbShapeBrushPenMargins: TGroupBox
|
|
||||||
AnchorSideLeft.Control = rgAlignment
|
|
||||||
AnchorSideLeft.Side = asrBottom
|
|
||||||
AnchorSideTop.Control = rgAlignment
|
|
||||||
AnchorSideRight.Control = ParamsPanel
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 235
|
|
||||||
Height = 168
|
|
||||||
Top = 0
|
|
||||||
Width = 310
|
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
BorderSpacing.Left = 24
|
|
||||||
Caption = 'Title/footer background'
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
object gbFont: TGroupBox
|
|
||||||
AnchorSideLeft.Control = rgAlignment
|
|
||||||
AnchorSideTop.Control = rgAlignment
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
AnchorSideRight.Control = rgAlignment
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 0
|
|
||||||
Height = 61
|
|
||||||
Top = 75
|
|
||||||
Width = 211
|
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
BorderSpacing.Top = 24
|
|
||||||
Caption = 'Font'
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object MemoPanel: TPanel
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
Left = 8
|
|
||||||
Height = 81
|
|
||||||
Top = 33
|
|
||||||
Width = 545
|
|
||||||
Align = alClient
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Right = 8
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 81
|
|
||||||
ClientWidth = 545
|
|
||||||
Constraints.MinHeight = 80
|
|
||||||
TabOrder = 1
|
|
||||||
object lblText: TLabel
|
|
||||||
AnchorSideLeft.Control = MemoPanel
|
|
||||||
AnchorSideTop.Control = MemoPanel
|
|
||||||
Left = 0
|
|
||||||
Height = 15
|
|
||||||
Top = 0
|
|
||||||
Width = 21
|
|
||||||
Caption = 'Text'
|
|
||||||
ParentColor = False
|
|
||||||
end
|
|
||||||
object mmoText: TMemo
|
|
||||||
AnchorSideLeft.Control = lblText
|
|
||||||
AnchorSideTop.Control = lblText
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
AnchorSideRight.Control = MemoPanel
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = MemoPanel
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 0
|
|
||||||
Height = 62
|
|
||||||
Top = 19
|
|
||||||
Width = 545
|
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
|
||||||
BorderSpacing.Top = 4
|
|
||||||
OnChange = mmoTextChange
|
|
||||||
ScrollBars = ssAutoBoth
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object PanelTop: TPanel
|
|
||||||
Left = 0
|
|
||||||
Height = 33
|
|
||||||
Top = 0
|
|
||||||
Width = 561
|
|
||||||
Align = alTop
|
|
||||||
AutoSize = True
|
|
||||||
BevelOuter = bvNone
|
|
||||||
ClientHeight = 33
|
|
||||||
ClientWidth = 561
|
|
||||||
TabOrder = 0
|
|
||||||
object cbShow: TCheckBox
|
|
||||||
Left = 8
|
|
||||||
Height = 19
|
|
||||||
Top = 8
|
|
||||||
Width = 49
|
|
||||||
BorderSpacing.Left = 8
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
BorderSpacing.Bottom = 6
|
|
||||||
Caption = 'Show'
|
|
||||||
Checked = True
|
|
||||||
OnChange = cbShowChange
|
|
||||||
State = cbChecked
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -5,9 +5,10 @@ unit ceTitleFootDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ButtonPanel,
|
Classes, SysUtils, Graphics,
|
||||||
ExtCtrls, Buttons, ComCtrls, ceShapeBrushPenMarginsFrame,
|
Forms, Controls, Dialogs, StdCtrls, ButtonPanel, ExtCtrls, Buttons, ComCtrls,
|
||||||
ceFontFrame, TAGraph, TATextElements;
|
TAGraph, TATextElements,
|
||||||
|
ceTitleFootFrame;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -15,34 +16,16 @@ type
|
|||||||
|
|
||||||
TChartTitleFootEditor = class(TForm)
|
TChartTitleFootEditor = class(TForm)
|
||||||
ButtonPanel: TButtonPanel;
|
ButtonPanel: TButtonPanel;
|
||||||
cbShow: TCheckBox;
|
|
||||||
gbShapeBrushPenMargins: TGroupBox;
|
|
||||||
gbFont: TGroupBox;
|
|
||||||
lblText: TLabel;
|
|
||||||
mmoText: TMemo;
|
|
||||||
MemoPanel: TPanel;
|
|
||||||
PanelTop: TPanel;
|
|
||||||
ParamsPanel: TPanel;
|
|
||||||
rgAlignment: TRadioGroup;
|
|
||||||
procedure cbShowChange(Sender: TObject);
|
|
||||||
procedure FormActivate(Sender: TObject);
|
procedure FormActivate(Sender: TObject);
|
||||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
|
||||||
procedure mmoTextChange(Sender: TObject);
|
|
||||||
procedure OKButtonClick(Sender: TObject);
|
procedure OKButtonClick(Sender: TObject);
|
||||||
procedure rgAlignmentClick(Sender: TObject);
|
|
||||||
private
|
private
|
||||||
FTitle: TChartTitle;
|
FTitle: TChartTitle;
|
||||||
FSavedTitle: TChartTitle;
|
FSavedTitle: TChartTitle;
|
||||||
FFontFrame: TChartFontFrame;
|
FTitleFootFrame: TChartTitleFootFrame;
|
||||||
FShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame;
|
|
||||||
FOKClicked: boolean;
|
FOKClicked: boolean;
|
||||||
procedure ChangedHandler(Sender: TObject);
|
|
||||||
function GetAlignment: TAlignment;
|
|
||||||
procedure SetAlignment(AValue: TAlignment);
|
|
||||||
procedure ShapeChangedHandler(AShape: TChartLabelShape);
|
|
||||||
protected
|
protected
|
||||||
function GetChart: TChart;
|
function GetChart: TChart;
|
||||||
public
|
public
|
||||||
@ -61,38 +44,21 @@ uses
|
|||||||
TATypes,
|
TATypes,
|
||||||
ceUtils;
|
ceUtils;
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.cbShowChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FTitle.Visible := cbShow.Checked;
|
|
||||||
lblText.Visible := cbShow.Checked;
|
|
||||||
mmoText.Visible := cbShow.Checked;
|
|
||||||
rgAlignment.Visible := cbShow.Checked;
|
|
||||||
gbShapeBrushPenMargins.Visible := cbShow.Checked;
|
|
||||||
gbFont.Visible := cbShow.Checked;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.FormActivate(Sender: TObject);
|
procedure TChartTitleFootEditor.FormActivate(Sender: TObject);
|
||||||
|
var
|
||||||
|
h, w: Integer;
|
||||||
begin
|
begin
|
||||||
Constraints.MinHeight := PanelTop.Height +
|
FTitleFootFrame.GetPreferredSize(w, h);
|
||||||
MemoPanel.Constraints.MinHeight +
|
inc(h, FTitleFootFrame.BorderSpacing.Around * 2);
|
||||||
ParamsPanel.Height + ParamsPanel.BorderSpacing.Around*2 +
|
inc(w, FTitleFootFrame.BorderSpacing.Around * 2);
|
||||||
ButtonPanel.Height + ButtonPanel.BorderSpacing.Around*2;
|
|
||||||
|
|
||||||
Constraints.MinWidth := gbFont.Width +
|
Constraints.MinHeight := h + ButtonPanel.Height + ButtonPanel.BorderSpacing.Around*2;
|
||||||
gbShapeBrushPenMargins.Width + gbShapeBrushPenMargins.BorderSpacing.Left +
|
Constraints.MinWidth := w;
|
||||||
ParamsPanel.BorderSpacing.Around * 2;
|
|
||||||
|
|
||||||
Width := 1; // Enforce the constraints.
|
Width := 1; // Enforce the constraints.
|
||||||
Height := 1;
|
Height := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.ChangedHandler(Sender: TObject);
|
|
||||||
begin
|
|
||||||
GetChart.Invalidate;
|
|
||||||
mmoText.Font.Assign(FTitle.Font);
|
|
||||||
mmoText.Color := FTitle.Brush.Color;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.FormCloseQuery(Sender: TObject;
|
procedure TChartTitleFootEditor.FormCloseQuery(Sender: TObject;
|
||||||
var CanClose: boolean);
|
var CanClose: boolean);
|
||||||
begin
|
begin
|
||||||
@ -106,29 +72,14 @@ end;
|
|||||||
procedure TChartTitleFootEditor.FormCreate(Sender: TObject);
|
procedure TChartTitleFootEditor.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Insert frames at runtime - this makes life much easier...
|
// Insert frames at runtime - this makes life much easier...
|
||||||
FFontFrame := TChartFontFrame.Create(self);
|
FTitleFootFrame := TChartTitleFootFrame.Create(self);
|
||||||
FFontFrame.Parent := gbFont;
|
FTitleFootFrame.Parent := Self;
|
||||||
FFontFrame.Align := alClient;
|
FTitleFootFrame.Name := '';
|
||||||
FFontFrame.BorderSpacing.Left := 8;
|
FTitleFootFrame.Align := alClient;
|
||||||
FFontFrame.BorderSpacing.Right := 8;
|
FTitleFootFrame.BorderSpacing.Around := 8;
|
||||||
FFontFrame.BorderSpacing.Bottom := 0;//8;
|
FTitleFootFrame.AutoSize := true;
|
||||||
FFontFrame.OnChange := @ChangedHandler;
|
|
||||||
gbFont.AutoSize := true;
|
|
||||||
|
|
||||||
FShapeBrushPenMarginsFrame := TChartShapeBrushPenMarginsFrame.Create(self);
|
// AutoSize := true;
|
||||||
FShapeBrushPenMarginsFrame.Parent := gbShapeBrushPenMargins;
|
|
||||||
FShapeBrushPenMarginsFrame.Align := alClient;
|
|
||||||
FShapeBrushPenMarginsFrame.BorderSpacing.Left := 8;
|
|
||||||
FShapeBrushPenMarginsFrame.BorderSpacing.Right := 8;
|
|
||||||
FShapeBrushPenMarginsFrame.BorderSpacing.Bottom := 8;
|
|
||||||
FShapeBrushPenMarginsFrame.Constraints.MinWidth := 230;
|
|
||||||
FShapeBrushPenMarginsFrame.OnChange := @ChangedHandler;
|
|
||||||
FShapeBrushPenMarginsFrame.OnShapeChange := @ShapeChangedHandler;
|
|
||||||
gbShapeBrushPenMargins.AutoSize := true;
|
|
||||||
|
|
||||||
BoldHeaders(Self);
|
|
||||||
|
|
||||||
ParamsPanel.AutoSize := true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.FormDestroy(Sender: TObject);
|
procedure TChartTitleFootEditor.FormDestroy(Sender: TObject);
|
||||||
@ -136,30 +87,6 @@ begin
|
|||||||
FSavedTitle.Free;
|
FSavedTitle.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.FormShow(Sender: TObject);
|
|
||||||
begin
|
|
||||||
(*
|
|
||||||
if cbShow.Checked then begin
|
|
||||||
AutoSize := true;
|
|
||||||
Constraints.MinWidth := Width;
|
|
||||||
Constraints.MinHeight := Height;
|
|
||||||
AutoSize := false;
|
|
||||||
end;
|
|
||||||
*)
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.mmoTextChange(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FTitle.Text.Assign(mmoText.Lines);
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TChartTitleFootEditor.GetAlignment: TAlignment;
|
|
||||||
const
|
|
||||||
ALIGNMENTS: array[0..2] of TAlignment = (taLeftJustify, taCenter, taRightJustify);
|
|
||||||
begin
|
|
||||||
Result := ALIGNMENTS[rgAlignment.ItemIndex];
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TChartTitleFootEditor.GetChart: TChart;
|
function TChartTitleFootEditor.GetChart: TChart;
|
||||||
begin
|
begin
|
||||||
Result := FTitle.GetOwner as TChart;
|
Result := FTitle.GetOwner as TChart;
|
||||||
@ -180,31 +107,7 @@ begin
|
|||||||
if ACaption <> '' then
|
if ACaption <> '' then
|
||||||
Caption := ACaption;
|
Caption := ACaption;
|
||||||
|
|
||||||
cbShow.Checked := ATitle.Visible;
|
FTitleFootFrame.Prepare(ATitle);
|
||||||
mmoText.Lines.Assign(ATitle.Text);
|
|
||||||
SetAlignment(ATitle.Alignment);
|
|
||||||
|
|
||||||
mmoText.Font.Assign(ATitle.Font);
|
|
||||||
mmoText.Font.Orientation := 0;
|
|
||||||
FFontFrame.Prepare(ATitle.Font, false);
|
|
||||||
FShapeBrushPenMarginsFrame.Prepare(ATitle.Shape, ATitle.Brush, ATitle.Frame, ATitle.Margins);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.rgAlignmentClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FTitle.Alignment := GetAlignment;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.SetAlignment(AValue: TAlignment);
|
|
||||||
const
|
|
||||||
ALIGNMENTS: array[TAlignment] of Integer = (0, 2, 1);
|
|
||||||
begin
|
|
||||||
rgAlignment.ItemIndex := ALIGNMENTS[AValue];
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TChartTitleFootEditor.ShapeChangedHandler(AShape: TChartLabelShape);
|
|
||||||
begin
|
|
||||||
FTitle.Shape := AShape;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
151
components/tachart/demo/charteditor/cetitlefootframe.lfm
Normal file
151
components/tachart/demo/charteditor/cetitlefootframe.lfm
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
object ChartTitleFootFrame: TChartTitleFootFrame
|
||||||
|
Left = 0
|
||||||
|
Height = 432
|
||||||
|
Top = 0
|
||||||
|
Width = 423
|
||||||
|
ClientHeight = 432
|
||||||
|
ClientWidth = 423
|
||||||
|
TabOrder = 0
|
||||||
|
DesignLeft = 500
|
||||||
|
DesignTop = 237
|
||||||
|
object PanelTop: TPanel
|
||||||
|
Left = 0
|
||||||
|
Height = 25
|
||||||
|
Top = 0
|
||||||
|
Width = 423
|
||||||
|
Align = alTop
|
||||||
|
AutoSize = True
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ClientHeight = 25
|
||||||
|
ClientWidth = 423
|
||||||
|
TabOrder = 0
|
||||||
|
object cbShow: TCheckBox
|
||||||
|
Left = 0
|
||||||
|
Height = 19
|
||||||
|
Top = 0
|
||||||
|
Width = 49
|
||||||
|
BorderSpacing.Bottom = 6
|
||||||
|
Caption = 'Show'
|
||||||
|
Checked = True
|
||||||
|
OnChange = cbShowChange
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ParamsPanel: TPanel
|
||||||
|
Left = 0
|
||||||
|
Height = 187
|
||||||
|
Top = 237
|
||||||
|
Width = 423
|
||||||
|
Align = alBottom
|
||||||
|
BorderSpacing.Top = 16
|
||||||
|
BorderSpacing.Bottom = 8
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ClientHeight = 187
|
||||||
|
ClientWidth = 423
|
||||||
|
TabOrder = 1
|
||||||
|
object rgAlignment: TRadioGroup
|
||||||
|
AnchorSideLeft.Control = ParamsPanel
|
||||||
|
AnchorSideTop.Control = ParamsPanel
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 51
|
||||||
|
Top = 0
|
||||||
|
Width = 211
|
||||||
|
AutoFill = True
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Alignment'
|
||||||
|
ChildSizing.LeftRightSpacing = 16
|
||||||
|
ChildSizing.TopBottomSpacing = 6
|
||||||
|
ChildSizing.HorizontalSpacing = 16
|
||||||
|
ChildSizing.EnlargeHorizontal = crsScaleChilds
|
||||||
|
ChildSizing.EnlargeVertical = crsScaleChilds
|
||||||
|
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||||
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
ChildSizing.ControlsPerLine = 3
|
||||||
|
ClientHeight = 31
|
||||||
|
ClientWidth = 207
|
||||||
|
Columns = 3
|
||||||
|
ItemIndex = 0
|
||||||
|
Items.Strings = (
|
||||||
|
'Left'
|
||||||
|
'Center'
|
||||||
|
'Right'
|
||||||
|
)
|
||||||
|
OnClick = rgAlignmentClick
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object gbShapeBrushPenMargins: TGroupBox
|
||||||
|
AnchorSideLeft.Control = rgAlignment
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = rgAlignment
|
||||||
|
AnchorSideRight.Control = ParamsPanel
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 235
|
||||||
|
Height = 168
|
||||||
|
Top = 0
|
||||||
|
Width = 188
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 24
|
||||||
|
Caption = 'Title/footer background'
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object gbFont: TGroupBox
|
||||||
|
AnchorSideLeft.Control = rgAlignment
|
||||||
|
AnchorSideTop.Control = rgAlignment
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = rgAlignment
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 61
|
||||||
|
Top = 67
|
||||||
|
Width = 211
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Top = 16
|
||||||
|
Caption = 'Font'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object MemoPanel: TPanel
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 196
|
||||||
|
Top = 25
|
||||||
|
Width = 423
|
||||||
|
Align = alClient
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ClientHeight = 196
|
||||||
|
ClientWidth = 423
|
||||||
|
Constraints.MinHeight = 80
|
||||||
|
TabOrder = 2
|
||||||
|
object lblText: TLabel
|
||||||
|
AnchorSideLeft.Control = MemoPanel
|
||||||
|
AnchorSideTop.Control = MemoPanel
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 0
|
||||||
|
Width = 21
|
||||||
|
Caption = 'Text'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object mmoText: TMemo
|
||||||
|
AnchorSideLeft.Control = lblText
|
||||||
|
AnchorSideTop.Control = lblText
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = MemoPanel
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = MemoPanel
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 177
|
||||||
|
Top = 19
|
||||||
|
Width = 423
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
OnChange = mmoTextChange
|
||||||
|
ScrollBars = ssAutoBoth
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
162
components/tachart/demo/charteditor/cetitlefootframe.pas
Normal file
162
components/tachart/demo/charteditor/cetitlefootframe.pas
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
unit ceTitleFootFrame;
|
||||||
|
|
||||||
|
{$mode ObjFPC}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, ExtCtrls, StdCtrls,
|
||||||
|
TATextElements, TAGraph,
|
||||||
|
ceFontFrame, ceShapeBrushPenMarginsFrame;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TChartTitleFootFrame }
|
||||||
|
|
||||||
|
TChartTitleFootFrame = class(TFrame)
|
||||||
|
cbShow: TCheckBox;
|
||||||
|
gbFont: TGroupBox;
|
||||||
|
gbShapeBrushPenMargins: TGroupBox;
|
||||||
|
lblText: TLabel;
|
||||||
|
MemoPanel: TPanel;
|
||||||
|
mmoText: TMemo;
|
||||||
|
PanelTop: TPanel;
|
||||||
|
ParamsPanel: TPanel;
|
||||||
|
rgAlignment: TRadioGroup;
|
||||||
|
procedure cbShowChange(Sender: TObject);
|
||||||
|
procedure mmoTextChange(Sender: TObject);
|
||||||
|
procedure rgAlignmentClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
FTitle: TChartTitle;
|
||||||
|
FFontFrame: TChartFontFrame;
|
||||||
|
FShapeBrushPenMarginsFrame: TChartShapeBrushPenMarginsFrame;
|
||||||
|
procedure ChangedHandler(Sender: TObject);
|
||||||
|
function GetAlignment: TAlignment;
|
||||||
|
procedure SetAlignment(AValue: TAlignment);
|
||||||
|
procedure ShapeChangedHandler(AShape: TChartLabelShape);
|
||||||
|
protected
|
||||||
|
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
||||||
|
WithThemeSpace: Boolean); override;
|
||||||
|
function GetChart: TChart;
|
||||||
|
public
|
||||||
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
procedure Prepare(ATitle: TChartTitle);
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
ceUtils;
|
||||||
|
|
||||||
|
constructor TChartTitleFootFrame.Create(AOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
FFontFrame := TChartFontFrame.Create(self);
|
||||||
|
FFontFrame.Parent := gbFont;
|
||||||
|
FFontFrame.Align := alClient;
|
||||||
|
FFontFrame.BorderSpacing.Left := 8;
|
||||||
|
FFontFrame.BorderSpacing.Right := 8;
|
||||||
|
FFontFrame.OnChange := @ChangedHandler;
|
||||||
|
gbFont.AutoSize := true;
|
||||||
|
|
||||||
|
FShapeBrushPenMarginsFrame := TChartShapeBrushPenMarginsFrame.Create(self);
|
||||||
|
FShapeBrushPenMarginsFrame.Parent := gbShapeBrushPenMargins;
|
||||||
|
FShapeBrushPenMarginsFrame.Align := alClient;
|
||||||
|
FShapeBrushPenMarginsFrame.BorderSpacing.Left := 8;
|
||||||
|
FShapeBrushPenMarginsFrame.BorderSpacing.Right := 8;
|
||||||
|
FShapeBrushPenMarginsFrame.BorderSpacing.Bottom := 8;
|
||||||
|
FShapeBrushPenMarginsFrame.Constraints.MinWidth := 230;
|
||||||
|
FShapeBrushPenMarginsFrame.OnChange := @ChangedHandler;
|
||||||
|
FShapeBrushPenMarginsFrame.OnShapeChange := @ShapeChangedHandler;
|
||||||
|
FShapeBrushPenMarginsFrame.AutoSize := true;
|
||||||
|
gbShapeBrushPenMargins.AutoSize := true;
|
||||||
|
|
||||||
|
BoldHeaders(Self);
|
||||||
|
|
||||||
|
ParamsPanel.AutoSize := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.CalculatePreferredSize(
|
||||||
|
var PreferredWidth, PreferredHeight: integer;
|
||||||
|
WithThemeSpace: Boolean);
|
||||||
|
begin
|
||||||
|
PreferredHeight := PanelTop.Height +
|
||||||
|
MemoPanel.Constraints.MinHeight +
|
||||||
|
ParamsPanel.Height + ParamsPanel.BorderSpacing.Top + ParamsPanel.BorderSpacing.Bottom;
|
||||||
|
|
||||||
|
PreferredWidth := gbFont.Width +
|
||||||
|
gbShapeBrushPenMargins.Width + gbShapeBrushPenMargins.BorderSpacing.Left;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.cbShowChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FTitle.Visible := cbShow.Checked;
|
||||||
|
lblText.Visible := cbShow.Checked;
|
||||||
|
mmoText.Visible := cbShow.Checked;
|
||||||
|
rgAlignment.Visible := cbShow.Checked;
|
||||||
|
gbShapeBrushPenMargins.Visible := cbShow.Checked;
|
||||||
|
gbFont.Visible := cbShow.Checked;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.ChangedHandler(Sender: TObject);
|
||||||
|
begin
|
||||||
|
GetChart.Invalidate;
|
||||||
|
mmoText.Font.Assign(FTitle.Font);
|
||||||
|
mmoText.Color := FTitle.Brush.Color;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TChartTitleFootFrame.GetAlignment: TAlignment;
|
||||||
|
const
|
||||||
|
ALIGNMENTS: array[0..2] of TAlignment = (taLeftJustify, taCenter, taRightJustify);
|
||||||
|
begin
|
||||||
|
Result := ALIGNMENTS[rgAlignment.ItemIndex];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TChartTitleFootFrame.GetChart: TChart;
|
||||||
|
begin
|
||||||
|
Result := FTitle.GetOwner as TChart;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.mmoTextChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FTitle.Text.Assign(mmoText.Lines);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.rgAlignmentClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FTitle.Alignment := GetAlignment;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.Prepare(ATitle: TChartTitle);
|
||||||
|
begin
|
||||||
|
FTitle := ATitle;
|
||||||
|
|
||||||
|
cbShow.Checked := ATitle.Visible;
|
||||||
|
mmoText.Lines.Assign(ATitle.Text);
|
||||||
|
mmoText.Font.Assign(ATitle.Font);
|
||||||
|
mmoText.Font.Orientation := 0;
|
||||||
|
|
||||||
|
SetAlignment(ATitle.Alignment);
|
||||||
|
|
||||||
|
FFontFrame.Prepare(ATitle.Font, false);
|
||||||
|
FShapeBrushPenMarginsFrame.Prepare(ATitle.Shape, ATitle.Brush, ATitle.Frame, ATitle.Margins);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.SetAlignment(AValue: TAlignment);
|
||||||
|
const
|
||||||
|
ALIGNMENTS: array[TAlignment] of Integer = (0, 2, 1);
|
||||||
|
begin
|
||||||
|
rgAlignment.ItemIndex := ALIGNMENTS[AValue];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TChartTitleFootFrame.ShapeChangedHandler(AShape: TChartLabelShape);
|
||||||
|
begin
|
||||||
|
FTitle.Shape := AShape;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -129,6 +129,13 @@
|
|||||||
<ResourceBaseClass Value="Frame"/>
|
<ResourceBaseClass Value="Frame"/>
|
||||||
<UnitName Value="ceLegendFrame"/>
|
<UnitName Value="ceLegendFrame"/>
|
||||||
</Unit>
|
</Unit>
|
||||||
|
<Unit>
|
||||||
|
<Filename Value="cetitlefootframe.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="ChartTitleFootFrame"/>
|
||||||
|
<ResourceBaseClass Value="Frame"/>
|
||||||
|
<UnitName Value="ceTitleFootFrame"/>
|
||||||
|
</Unit>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -7,7 +7,7 @@ uses
|
|||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, ceMain, ceSeriesDlg, cePointerFrame;
|
Forms, ceMain, ceSeriesDlg, cePointerFrame, ceTitleFootFrame;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user