diff --git a/components/tachart/demo/charteditor/cebrushframe.lfm b/components/tachart/demo/charteditor/cebrushframe.lfm index a1f0f5c771..a7890bad28 100644 --- a/components/tachart/demo/charteditor/cebrushframe.lfm +++ b/components/tachart/demo/charteditor/cebrushframe.lfm @@ -13,16 +13,17 @@ object BrushFrame: TBrushFrame AnchorSideLeft.Control = lblBrushStyle AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = Owner + AnchorSideTop.Side = asrCenter AnchorSideRight.Control = cbBrushColor - Left = 48 + Left = 49 Height = 22 - Top = 0 - Width = 144 + Top = 1 + Width = 142 Mode = ccmBrushStyle PenPattern = '1|1' PointerStyle = psNone Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 23 + BorderSpacing.Left = 24 ItemHeight = 16 ItemIndex = 0 TabOrder = 0 @@ -34,7 +35,7 @@ object BrushFrame: TBrushFrame AnchorSideTop.Side = asrCenter Left = 0 Height = 15 - Top = 4 + Top = 5 Width = 25 Caption = 'Style' ParentColor = False @@ -47,13 +48,14 @@ object BrushFrame: TBrushFrame AnchorSideRight.Side = asrBottom Left = 197 Height = 25 - Top = -1 + Top = 0 Width = 31 Anchors = [akTop, akRight] - BorderSpacing.Left = 5 + BorderSpacing.Left = 6 BorderWidth = 2 ButtonColorSize = 16 ButtonColor = clBlack + Margin = 2 OnColorChanged = cbBrushColorColorChanged end end diff --git a/components/tachart/demo/charteditor/cepenframe.lfm b/components/tachart/demo/charteditor/cepenframe.lfm index d4741a456a..fa63aaaf4f 100644 --- a/components/tachart/demo/charteditor/cepenframe.lfm +++ b/components/tachart/demo/charteditor/cepenframe.lfm @@ -2,10 +2,10 @@ object PenFrame: TPenFrame Left = 0 Height = 56 Top = 0 - Width = 230 + Width = 212 AutoSize = True ClientHeight = 56 - ClientWidth = 230 + ClientWidth = 212 TabOrder = 0 DesignLeft = 332 DesignTop = 128 @@ -17,7 +17,7 @@ object PenFrame: TPenFrame Left = 48 Height = 22 Top = 0 - Width = 146 + Width = 128 PenPattern = '1|1' PointerStyle = psNone Anchors = [akTop, akLeft, akRight] @@ -47,7 +47,7 @@ object PenFrame: TPenFrame Left = 48 Height = 22 Top = 30 - Width = 146 + Width = 128 Mode = ccmPenWidth PenPattern = '1|1' PointerStyle = psNone @@ -75,7 +75,7 @@ object PenFrame: TPenFrame AnchorSideTop.Side = asrCenter AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 199 + Left = 181 Height = 25 Top = 14 Width = 31 @@ -91,7 +91,7 @@ object PenFrame: TPenFrame AnchorSideRight.Control = cbPenColor AnchorSideBottom.Control = cbPenWidth AnchorSideBottom.Side = asrBottom - Left = 194 + Left = 176 Height = 52 Top = 0 Width = 5 diff --git a/components/tachart/demo/charteditor/cepointerframe.lfm b/components/tachart/demo/charteditor/cepointerframe.lfm index f80ee5f3a7..b3c0167917 100644 --- a/components/tachart/demo/charteditor/cepointerframe.lfm +++ b/components/tachart/demo/charteditor/cepointerframe.lfm @@ -1,170 +1,14 @@ object PointerFrame: TPointerFrame Left = 0 - Height = 171 + Height = 194 Top = 0 Width = 320 AutoSize = True - ClientHeight = 171 + ClientHeight = 194 ClientWidth = 320 TabOrder = 0 DesignLeft = 658 DesignTop = 295 - object Bevel1: TBevel - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Label2 - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - AnchorSideBottom.Control = Label1 - AnchorSideBottom.Side = asrBottom - Left = 0 - Height = 5 - Top = 59 - Width = 320 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 7 - Shape = bsTopLine - end - inline PointerBrushFrame: TBrushFrame - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Label2 - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - Top = 69 - Width = 320 - Anchors = [akTop, akLeft, akRight] - AutoSize = False - BorderSpacing.Top = 2 - BorderSpacing.Bottom = 8 - ClientWidth = 320 - TabOrder = 2 - inherited cbBrushStyle: TChartComboBox - AnchorSideTop.Control = PointerBrushFrame - Width = 236 - end - inherited lblBrushStyle: TLabel - AnchorSideLeft.Control = PointerBrushFrame - end - inherited cbBrushColor: TColorButton - AnchorSideRight.Control = PointerBrushFrame - Left = 289 - end - end - object cbPointerStyle: TChartComboBox - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Label1 - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = lblPointerSize - Left = 0 - Height = 22 - Top = 21 - Width = 234 - Mode = ccmPointerStyle - PenPattern = '1|1' - PointerStyle = psNone - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 6 - BorderSpacing.Right = 8 - ItemHeight = 16 - ItemIndex = 0 - TabOrder = 0 - OnChange = cbPointerStyleChange - end - object Label2: TLabel - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = sePointerSize - AnchorSideTop.Side = asrBottom - Left = 12 - Height = 15 - Top = 52 - Width = 15 - BorderSpacing.Left = 12 - BorderSpacing.Top = 8 - Caption = 'Fill' - Color = clForm - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - Transparent = False - end - object Bevel2: TBevel - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Label3 - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - AnchorSideBottom.Control = Label1 - AnchorSideBottom.Side = asrBottom - Left = 0 - Height = 5 - Top = 108 - Width = 320 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 7 - Shape = bsTopLine - end - object Label3: TLabel - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = PointerBrushFrame - AnchorSideTop.Side = asrBottom - Left = 12 - Height = 15 - Top = 101 - Width = 39 - BorderSpacing.Left = 12 - BorderSpacing.Top = 8 - Caption = 'Border' - Color = clForm - Font.Style = [fsBold] - ParentColor = False - ParentFont = False - Transparent = False - end - inline PointerPenFrame: TPenFrame - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Label3 - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - Top = 118 - Width = 320 - Anchors = [akTop, akLeft, akRight] - AutoSize = False - BorderSpacing.Top = 2 - ClientWidth = 320 - TabOrder = 3 - inherited cbPenStyle: TChartComboBox - AnchorSideTop.Control = PointerPenFrame - Width = 236 - end - inherited lblPenStyle: TLabel - AnchorSideLeft.Control = PointerPenFrame - end - inherited cbPenWidth: TChartComboBox - Width = 236 - end - inherited cbPenColor: TColorButton - AnchorSideRight.Control = PointerPenFrame - Left = 289 - end - inherited Bevel1: TBevel - Left = 284 - end - end - object Bevel3: TBevel - AnchorSideLeft.Control = Owner - AnchorSideTop.Control = Owner - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - AnchorSideBottom.Control = Label1 - AnchorSideBottom.Side = asrBottom - Left = 0 - Height = 5 - Top = 7 - Width = 320 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 7 - Shape = bsTopLine - end object Label1: TLabel AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner @@ -180,37 +24,90 @@ object PointerFrame: TPointerFrame ParentFont = False Transparent = False end - object lblPointerSize: TLabel - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = sePointerSize - AnchorSideTop.Side = asrCenter - AnchorSideRight.Control = sePointerSize - Left = 242 - Height = 15 - Top = 25 - Width = 20 - Anchors = [akTop, akRight] - BorderSpacing.Left = 8 - Caption = 'Size' - FocusControl = sePointerSize - ParentColor = False + object GroupBox1: TGroupBox + Left = 0 + Height = 56 + Top = 0 + Width = 320 + Align = alTop + AutoSize = True + Caption = 'Pointer style' + ClientHeight = 36 + ClientWidth = 316 + TabOrder = 0 + object cbPointerStyle: TChartComboBox + AnchorSideLeft.Control = GroupBox1 + AnchorSideTop.Control = sePointerSize + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = lblPointerSize + Left = 8 + Height = 22 + Top = 6 + Width = 214 + Mode = ccmPointerStyle + PenPattern = '1|1' + PointerStyle = psNone + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 6 + BorderSpacing.Right = 8 + BorderSpacing.Bottom = 8 + ItemHeight = 16 + ItemIndex = 0 + TabOrder = 0 + OnChange = cbPointerStyleChange + end + object lblPointerSize: TLabel + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = sePointerSize + AnchorSideTop.Side = asrCenter + AnchorSideRight.Control = sePointerSize + Left = 230 + Height = 15 + Top = 10 + Width = 20 + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + Caption = 'Size' + FocusControl = sePointerSize + ParentColor = False + end + object sePointerSize: TSpinEdit + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = GroupBox1 + AnchorSideRight.Control = GroupBox1 + AnchorSideRight.Side = asrBottom + Left = 258 + Height = 23 + Top = 6 + Width = 50 + Alignment = taRightJustify + Anchors = [akTop, akRight] + BorderSpacing.Left = 8 + BorderSpacing.Top = 6 + BorderSpacing.Right = 8 + OnChange = sePointerSizeChange + TabOrder = 1 + end end - object sePointerSize: TSpinEdit - AnchorSideLeft.Control = lblPointerSize - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = cbPointerStyle - AnchorSideTop.Side = asrCenter - AnchorSideRight.Control = Owner - AnchorSideRight.Side = asrBottom - Left = 270 - Height = 23 - Top = 21 - Width = 50 - Alignment = taRightJustify - Anchors = [akTop, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Top = 6 - OnChange = sePointerSizeChange + object gbPointerBrush: TGroupBox + Left = 0 + Height = 40 + Top = 68 + Width = 320 + Align = alTop + BorderSpacing.Top = 12 + Caption = 'gbPointerBrush' TabOrder = 1 end + object gbPointerPen: TGroupBox + Left = 0 + Height = 58 + Top = 120 + Width = 320 + Align = alTop + BorderSpacing.Top = 12 + Caption = 'gbPointerPen' + TabOrder = 2 + end end diff --git a/components/tachart/demo/charteditor/cepointerframe.pas b/components/tachart/demo/charteditor/cepointerframe.pas index b8dce7fa22..4c4eb74daa 100644 --- a/components/tachart/demo/charteditor/cepointerframe.pas +++ b/components/tachart/demo/charteditor/cepointerframe.pas @@ -14,22 +14,21 @@ type { TPointerFrame } TPointerFrame = class(TFrame) - Bevel1: TBevel; - Bevel2: TBevel; - Bevel3: TBevel; cbPointerStyle: TChartComboBox; + GroupBox1: TGroupBox; + gbPointerBrush: TGroupBox; + gbPointerPen: TGroupBox; Label1: TLabel; - Label2: TLabel; - Label3: TLabel; lblPointerSize: TLabel; - PointerPenFrame: TPenFrame; - PointerBrushFrame: TBrushFrame; sePointerSize: TSpinEdit; procedure cbPointerStyleChange(Sender: TObject); procedure sePointerSizeChange(Sender: TObject); private FPointer: TSeriesPointer; + FPointerBrushFrame: TBrushFrame; + FPointerPenFrame: TPenFrame; FOnChange: TNotifyEvent; + procedure ChangedHandler(Sender: TObject); procedure DoChange; protected function GetChart: TChart; @@ -51,6 +50,30 @@ constructor TPointerFrame.Create(AOwner: TComponent); begin inherited; cbPointerStyle.DropdownCount := DEFAULT_DROPDOWN_COUNT; + + FPointerBrushFrame := TBrushFrame.Create(Self); + FPointerBrushFrame.Parent := gbPointerBrush; + FPointerBrushFrame.Name := ''; + FPointerBrushFrame.Align := alClient; + FPointerBrushFrame.BorderSpacing.Left := 8; + FPointerBrushFrame.BorderSpacing.Right := 8; + FPointerBrushFrame.BorderSpacing.Bottom := 8; + FPointerBrushFrame.OnChange := @ChangedHandler; + gbPointerBrush.Caption := 'Fill'; + gbPointerBrush.AutoSize := true; + + FPointerPenFrame := TPenFrame.Create(self); + FPointerPenFrame.Parent := gbPointerPen; + FPointerPenFrame.Name := ''; + FPointerPenFrame.Align := alClient; + FPointerPenFrame.borderspacing.Left := 8; + FPointerPenFrame.BorderSpacing.Right := 8; + FPointerPenFrame.BorderSpacing.Bottom := 8; + FPointerPenFrame.OnChange := @ChangedHandler; + gbPointerPen.caption := 'Border'; + gbPointerPen.AutoSize := true; + + AutoSize := true; end; procedure TPointerFrame.cbPointerStyleChange(Sender: TObject); @@ -59,6 +82,11 @@ begin DoChange; end; +procedure TPointerFrame.ChangedHandler(Sender: TObject); +begin + DoChange; +end; + procedure TPointerFrame.sePointerSizeChange(Sender: TObject); begin FPointer.HorizSize := sePointerSize.Value; @@ -81,8 +109,8 @@ begin FPointer := APointer; cbPointerStyle.PointerStyle := APointer.Style; sePointerSize.Value := APointer.HorizSize; - PointerBrushFrame.Prepare(APointer.Brush); - PointerPenFrame.Prepare(APointer.Pen); + FPointerBrushFrame.Prepare(APointer.Brush); + FPointerPenFrame.Prepare(APointer.Pen); end; end. diff --git a/components/tachart/demo/charteditor/ceseriesdlg.lfm b/components/tachart/demo/charteditor/ceseriesdlg.lfm index dd689903ee..8b6757fd74 100644 --- a/components/tachart/demo/charteditor/ceseriesdlg.lfm +++ b/components/tachart/demo/charteditor/ceseriesdlg.lfm @@ -37,7 +37,7 @@ object SeriesEditor: TSeriesEditor Height = 254 Top = 150 Width = 600 - PageIndex = 0 + PageIndex = 2 Align = alClient TabOrder = 1 object pgLineSeries: TPage @@ -46,59 +46,22 @@ object SeriesEditor: TSeriesEditor AnchorSideTop.Control = pgLineSeries AnchorSideRight.Control = Bevel1 Left = 8 - Height = 113 + Height = 88 Top = 8 Width = 284 Anchors = [akTop, akLeft, akRight] - AutoSize = True BorderSpacing.Left = 8 BorderSpacing.Top = 8 - Caption = 'Connecting lines' - ClientHeight = 93 + Caption = 'gbLineSeriesLineStyle' + ClientHeight = 68 ClientWidth = 280 TabOrder = 0 - inline LineSeriesPenFrame: TPenFrame - AnchorSideTop.Control = cbLineSeriesShowLines - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = gbLineSeriesLineStyle - AnchorSideRight.Side = asrBottom - Left = 8 - Height = 52 - Top = 33 - Width = 264 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Top = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 8 - ClientHeight = 52 - ClientWidth = 264 - TabOrder = 1 - inherited cbPenStyle: TChartComboBox - AnchorSideTop.Control = LineSeriesPenFrame - Width = 180 - end - inherited lblPenStyle: TLabel - AnchorSideLeft.Control = LineSeriesPenFrame - end - inherited cbPenWidth: TChartComboBox - Width = 180 - end - inherited cbPenColor: TColorButton - AnchorSideRight.Control = LineSeriesPenFrame - Left = 233 - end - inherited Bevel1: TBevel - Left = 228 - end - end object cbLineSeriesShowLines: TCheckBox - AnchorSideLeft.Control = gbLineSeriesLineStyle - AnchorSideTop.Control = gbLineSeriesLineStyle Left = 8 Height = 19 Top = 6 - Width = 54 + Width = 272 + Align = alTop BorderSpacing.Left = 8 BorderSpacing.Top = 6 Caption = 'Visible' @@ -113,149 +76,34 @@ object SeriesEditor: TSeriesEditor AnchorSideRight.Control = pgLineSeries AnchorSideRight.Side = asrBottom Left = 308 - Height = 231 + Height = 240 Top = 8 Width = 284 Anchors = [akTop, akLeft, akRight] - AutoSize = True BorderSpacing.Right = 8 - Caption = 'Series pointer' - ClientHeight = 211 + Caption = 'gbLineSeriesPointer' + ClientHeight = 220 ClientWidth = 280 TabOrder = 1 object cbLineSeriesShowPoints: TCheckBox - AnchorSideLeft.Control = gbLineSeriesPointer - AnchorSideTop.Control = gbLineSeriesPointer Left = 8 Height = 19 Top = 6 - Width = 54 + Width = 272 + Align = alTop BorderSpacing.Left = 8 BorderSpacing.Top = 6 Caption = 'Visible' OnChange = cbLineSeriesShowPointsChange TabOrder = 0 end - inline LineSeriesPointerFrame: TPointerFrame - AnchorSideLeft.Control = gbLineSeriesPointer - AnchorSideTop.Control = cbLineSeriesShowPoints - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = gbLineSeriesPointer - AnchorSideRight.Side = asrBottom - Left = 8 - Height = 170 - Top = 33 - Width = 264 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Top = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 8 - ClientHeight = 170 - ClientWidth = 264 - TabOrder = 1 - inherited Bevel1: TBevel - AnchorSideLeft.Control = LineSeriesPointerFrame - AnchorSideRight.Control = LineSeriesPointerFrame - Width = 264 - end - inherited PointerBrushFrame: TBrushFrame - AnchorSideLeft.Control = LineSeriesPointerFrame - AnchorSideTop.Control = LineSeriesPointerFrame.Label2 - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = LineSeriesPointerFrame - AnchorSideRight.Side = asrBottom - Top = 69 - Width = 264 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 2 - BorderSpacing.Bottom = 8 - ClientWidth = 264 - TabOrder = 2 - inherited cbBrushStyle: TChartComboBox - AnchorSideTop.Control = LineSeriesPointerFrame.PointerBrushFrame - Width = 180 - end - inherited lblBrushStyle: TLabel - AnchorSideLeft.Control = LineSeriesPointerFrame.PointerBrushFrame - end - inherited cbBrushColor: TColorButton - AnchorSideRight.Control = LineSeriesPointerFrame.PointerBrushFrame - Left = 233 - end - end - inherited cbPointerStyle: TChartComboBox - AnchorSideLeft.Control = LineSeriesPointerFrame - Width = 178 - end - inherited Label2: TLabel - AnchorSideLeft.Control = LineSeriesPointerFrame - end - inherited Bevel2: TBevel - AnchorSideLeft.Control = LineSeriesPointerFrame - AnchorSideRight.Control = LineSeriesPointerFrame - Width = 264 - end - inherited Label3: TLabel - AnchorSideLeft.Control = LineSeriesPointerFrame - end - inherited PointerPenFrame: TPenFrame - AnchorSideLeft.Control = LineSeriesPointerFrame - AnchorSideTop.Control = LineSeriesPointerFrame.Label3 - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = LineSeriesPointerFrame - AnchorSideRight.Side = asrBottom - Height = 52 - Top = 118 - Width = 264 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Top = 2 - ClientHeight = 52 - ClientWidth = 264 - TabOrder = 3 - inherited cbPenStyle: TChartComboBox - AnchorSideTop.Control = LineSeriesPointerFrame.PointerPenFrame - Width = 180 - end - inherited lblPenStyle: TLabel - AnchorSideLeft.Control = LineSeriesPointerFrame.PointerPenFrame - end - inherited cbPenWidth: TChartComboBox - Width = 180 - end - inherited cbPenColor: TColorButton - AnchorSideRight.Control = LineSeriesPointerFrame.PointerPenFrame - Left = 233 - end - inherited Bevel1: TBevel - Left = 228 - end - end - inherited Bevel3: TBevel - AnchorSideLeft.Control = LineSeriesPointerFrame - AnchorSideTop.Control = LineSeriesPointerFrame - AnchorSideRight.Control = LineSeriesPointerFrame - Width = 264 - end - inherited Label1: TLabel - AnchorSideLeft.Control = LineSeriesPointerFrame - AnchorSideTop.Control = LineSeriesPointerFrame - end - inherited lblPointerSize: TLabel - Left = 186 - end - inherited sePointerSize: TSpinEdit - AnchorSideRight.Control = LineSeriesPointerFrame - Left = 214 - end - end end object Bevel1: TBevel AnchorSideLeft.Control = pgLineSeries AnchorSideLeft.Side = asrCenter Left = 292 Height = 104 - Top = 152 + Top = 120 Width = 16 Shape = bsSpacer end @@ -269,48 +117,12 @@ object SeriesEditor: TSeriesEditor Left = 8 Height = 92 Top = 60 - Width = 267 + Width = 284 Anchors = [akTop, akLeft, akRight] - AutoSize = True BorderSpacing.Left = 8 BorderSpacing.Top = 8 - Caption = 'Border' - ClientHeight = 72 - ClientWidth = 263 + Caption = 'gbBarSeriesBorder' TabOrder = 2 - inline BarSeriesPenFrame: TPenFrame - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = gbBarSeriesBorder - AnchorSideRight.Side = asrBottom - Left = 8 - Height = 52 - Top = 8 - Width = 247 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Top = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 12 - ClientHeight = 52 - ClientWidth = 247 - inherited cbPenStyle: TChartComboBox - AnchorSideTop.Control = BarSeriesPenFrame - Width = 163 - end - inherited lblPenStyle: TLabel - AnchorSideLeft.Control = BarSeriesPenFrame - end - inherited cbPenWidth: TChartComboBox - Width = 163 - end - inherited cbPenColor: TColorButton - AnchorSideRight.Control = BarSeriesPenFrame - Left = 216 - end - inherited Bevel1: TBevel - Left = 211 - end - end end object gbBarSeriesBrush: TGroupBox AnchorSideLeft.Control = pgBarSeries @@ -319,38 +131,11 @@ object SeriesEditor: TSeriesEditor Left = 8 Height = 52 Top = 0 - Width = 267 + Width = 284 Anchors = [akTop, akLeft, akRight] - AutoSize = True BorderSpacing.Left = 8 - Caption = 'Bar brush' - ClientHeight = 32 - ClientWidth = 263 + Caption = 'gbBarSeriesBrush' TabOrder = 0 - inline BarSeriesBrushFrame: TBrushFrame - AnchorSideLeft.Control = gbBarSeriesBrush - AnchorSideTop.Control = gbBarSeriesBrush - AnchorSideRight.Control = gbBarSeriesBrush - AnchorSideRight.Side = asrBottom - Left = 8 - Width = 247 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 8 - ClientWidth = 247 - inherited cbBrushStyle: TChartComboBox - AnchorSideTop.Control = BarSeriesBrushFrame - Width = 163 - end - inherited lblBrushStyle: TLabel - AnchorSideLeft.Control = BarSeriesBrushFrame - end - inherited cbBrushColor: TColorButton - AnchorSideRight.Control = BarSeriesBrushFrame - Left = 216 - end - end end object gbBarShape: TGroupBox AnchorSideLeft.Control = Bevel2 @@ -360,16 +145,16 @@ object SeriesEditor: TSeriesEditor AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = gbBarSeriesBrush AnchorSideBottom.Side = asrBottom - Left = 291 + Left = 308 Height = 52 Top = 0 - Width = 268 + Width = 284 Anchors = [akTop, akLeft, akRight, akBottom] AutoSize = True BorderSpacing.Right = 8 Caption = 'Bar shape' ClientHeight = 32 - ClientWidth = 264 + ClientWidth = 280 TabOrder = 1 object cbBarShape: TComboBox AnchorSideLeft.Control = gbBarShape @@ -379,7 +164,7 @@ object SeriesEditor: TSeriesEditor Left = 8 Height = 23 Top = 0 - Width = 248 + Width = 264 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 8 BorderSpacing.Right = 8 @@ -402,7 +187,7 @@ object SeriesEditor: TSeriesEditor object Bevel2: TBevel AnchorSideLeft.Control = pgBarSeries AnchorSideLeft.Side = asrCenter - Left = 275 + Left = 292 Height = 11 Top = 208 Width = 16 @@ -417,37 +202,11 @@ object SeriesEditor: TSeriesEditor Left = 8 Height = 57 Top = 0 - Width = 267 + Width = 284 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 8 - Caption = 'Area fill' - ClientHeight = 37 - ClientWidth = 263 + Caption = 'gbAreaSeriesBrush' TabOrder = 0 - inline AreaSeriesBrushFrame: TBrushFrame - AnchorSideLeft.Control = gbAreaSeriesBrush - AnchorSideTop.Control = gbAreaSeriesBrush - AnchorSideRight.Control = gbAreaSeriesBrush - AnchorSideRight.Side = asrBottom - Left = 8 - Width = 247 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 8 - ClientWidth = 247 - inherited cbBrushStyle: TChartComboBox - AnchorSideTop.Control = AreaSeriesBrushFrame - Width = 163 - end - inherited lblBrushStyle: TLabel - AnchorSideLeft.Control = AreaSeriesBrushFrame - end - inherited cbBrushColor: TColorButton - AnchorSideRight.Control = AreaSeriesBrushFrame - Left = 216 - end - end end object gbAreaContourPen: TGroupBox AnchorSideLeft.Control = gbAreaSeriesBrush @@ -457,68 +216,31 @@ object SeriesEditor: TSeriesEditor Left = 8 Height = 115 Top = 65 - Width = 267 + Width = 284 Anchors = [akTop, akLeft, akRight] - AutoSize = True BorderSpacing.Top = 8 - Caption = 'Border' + Caption = 'gbAreaContourPen' ClientHeight = 95 - ClientWidth = 263 + ClientWidth = 280 TabOrder = 1 object cbAreaShowContourLines: TCheckBox - AnchorSideLeft.Control = gbAreaContourPen - AnchorSideTop.Control = gbAreaContourPen Left = 8 Height = 19 Top = 8 - Width = 54 + Width = 272 + Align = alTop BorderSpacing.Left = 8 BorderSpacing.Top = 8 + BorderSpacing.Bottom = 8 Caption = 'Visible' OnChange = cbAreaShowContourLinesChange TabOrder = 0 end - inline AreaSeriesContourPenFrame: TPenFrame - AnchorSideLeft.Control = gbAreaContourPen - AnchorSideTop.Control = cbAreaShowContourLines - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = gbAreaContourPen - AnchorSideRight.Side = asrBottom - Left = 8 - Height = 52 - Top = 35 - Width = 247 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Top = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 8 - ClientHeight = 52 - ClientWidth = 247 - TabOrder = 1 - inherited cbPenStyle: TChartComboBox - AnchorSideTop.Control = AreaSeriesContourPenFrame - Width = 163 - end - inherited lblPenStyle: TLabel - AnchorSideLeft.Control = AreaSeriesContourPenFrame - end - inherited cbPenWidth: TChartComboBox - Width = 163 - end - inherited cbPenColor: TColorButton - AnchorSideRight.Control = AreaSeriesContourPenFrame - Left = 216 - end - inherited Bevel1: TBevel - Left = 211 - end - end end object Bevel3: TBevel AnchorSideLeft.Control = pgAreaSeries AnchorSideLeft.Side = asrCenter - Left = 275 + Left = 292 Height = 104 Top = 72 Width = 16 @@ -531,67 +253,30 @@ object SeriesEditor: TSeriesEditor AnchorSideTop.Side = asrBottom AnchorSideRight.Control = pgAreaSeries AnchorSideRight.Side = asrBottom - Left = 291 + Left = 308 Height = 115 Top = 65 - Width = 268 + Width = 284 Anchors = [akTop, akLeft, akRight] - AutoSize = True BorderSpacing.Top = 8 BorderSpacing.Right = 8 - Caption = 'Drop lines' + Caption = 'gbAreaDropLinePen' ClientHeight = 95 - ClientWidth = 264 + ClientWidth = 280 TabOrder = 2 object cbAreaShowDropLines: TCheckBox - AnchorSideLeft.Control = gbAreaDropLinePen - AnchorSideTop.Control = gbAreaDropLinePen Left = 8 Height = 19 Top = 8 - Width = 54 + Width = 272 + Align = alTop BorderSpacing.Left = 8 BorderSpacing.Top = 8 + BorderSpacing.Bottom = 8 Caption = 'Visible' OnChange = cbAreaShowDropLinesChange TabOrder = 0 end - inline AreaSeriesDropLinesPenFrame: TPenFrame - AnchorSideLeft.Control = gbAreaDropLinePen - AnchorSideTop.Control = cbAreaShowDropLines - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = gbAreaDropLinePen - AnchorSideRight.Side = asrBottom - Left = 8 - Height = 52 - Top = 35 - Width = 248 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 8 - BorderSpacing.Top = 8 - BorderSpacing.Right = 8 - BorderSpacing.Bottom = 8 - ClientHeight = 52 - ClientWidth = 248 - TabOrder = 1 - inherited cbPenStyle: TChartComboBox - AnchorSideTop.Control = AreaSeriesDropLinesPenFrame - Width = 164 - end - inherited lblPenStyle: TLabel - AnchorSideLeft.Control = AreaSeriesDropLinesPenFrame - end - inherited cbPenWidth: TChartComboBox - Width = 164 - end - inherited cbPenColor: TColorButton - AnchorSideRight.Control = AreaSeriesDropLinesPenFrame - Left = 217 - end - inherited Bevel1: TBevel - Left = 212 - end - end end end end diff --git a/components/tachart/demo/charteditor/ceseriesdlg.pas b/components/tachart/demo/charteditor/ceseriesdlg.pas index 692c61cd4e..384b1bf2d3 100644 --- a/components/tachart/demo/charteditor/ceseriesdlg.pas +++ b/components/tachart/demo/charteditor/ceseriesdlg.pas @@ -15,12 +15,9 @@ type { TSeriesEditor } TSeriesEditor = class(TForm) - AreaSeriesDropLinesPenFrame: TPenFrame; Bevel1: TBevel; - BarSeriesBrushFrame: TBrushFrame; Bevel2: TBevel; Bevel3: TBevel; - AreaSeriesBrushFrame: TBrushFrame; Bevel4: TBevel; ButtonPanel: TButtonPanel; cbAreaShowDropLines: TCheckBox; @@ -53,15 +50,11 @@ type lblSeriesMarksStyle: TLabel; lblPenStyle: TLabel; lblPenWidth: TLabel; - BarSeriesPenFrame: TPenFrame; nbSeriesTypes: TNotebook; - LineSeriesPenFrame: TPenFrame; - AreaSeriesContourPenFrame: TPenFrame; pgAreaSeries: TPage; pgBarSeries: TPage; pgLineSeries: TPage; PanelTop: TPanel; - LineSeriesPointerFrame: TPointerFrame; procedure cbAreaShowContourLinesChange(Sender: TObject); procedure cbAreaShowDropLinesChange(Sender: TObject); procedure cbBarShapeChange(Sender: TObject); @@ -84,6 +77,13 @@ type FSavedSeries: TBasicChartSeries; FSavedActive: Boolean; FOKClicked: Boolean; + FLineSeriesPenFrame: TPenFrame; + FLineSeriesPointerFrame: TPointerFrame; + FBarSeriesBrushFrame: TBrushFrame; + FBarSeriesPenFrame: TPenFrame; + FAreaSeriesBrushFrame: TBrushFrame; + FAreaSeriesContourPenFrame: TPenFrame; + FAreaSeriesDropLinesPenFrame: TPenFrame; procedure ChangedHandler(Sender: TObject); protected function GetChart: TChart; @@ -135,14 +135,94 @@ end; procedure TSeriesEditor.FormCreate(Sender: TObject); begin + { Line series page } + FLineSeriesPenFrame := TPenFrame.Create(self); + FLineSeriesPenFrame.Parent := gbLineSeriesLineStyle; + FLineSeriesPenFrame.Name := ''; + FLineSeriesPenFrame.Align := alTop; + FLineseriesPenFrame.Top := 1000; + FLineSeriesPenFrame.BorderSpacing.Around := 8; + FLineSeriesPenFrame.OnChange := @ChangedHandler; + gbLineSeriesLineStyle.Caption := 'Connecting lines'; + gbLineSeriesLineStyle.AutoSize := true; + + FLineSeriesPointerFrame := TPointerFrame.Create(self); + FLineSeriesPointerFrame.Parent := gbLineSeriesPointer; + FLineSeriesPointerFrame.Name := ''; + FLineSeriesPointerFrame.Align := alTop; + FLineseriesPointerFrame.Top := 1000; + FLineSeriesPointerFrame.BorderSpacing.Around := 8; + FLineSeriesPointerFrame.OnChange := @ChangedHandler; + gbLineSeriesPointer.Caption := 'Series pointer'; + gbLineSeriesPointer.AutoSize := true; + + { Bar series page } + FBarSeriesBrushFrame := TBrushFrame.Create(self); + FBarSeriesBrushFrame.Parent := gbBarSeriesBrush; + FBarSeriesBrushFrame.Name := ''; + FBarSeriesBrushFrame.Align := alTop; + FBarSeriesBrushFrame.BorderSpacing.Left := 8; + FBarSeriesBrushFrame.BorderSpacing.Right := 8; + FBarSeriesBrushFrame.BorderSpacing.Bottom := 8; + FBarSeriesBrushFrame.OnChange := @ChangedHandler; + gbBarSeriesBrush.Caption := 'Bar brush'; + gbBarSeriesBrush.AutoSize := true; + + FBarSeriesPenFrame := TPenFrame.Create(self); + FBarSeriesPenFrame.Parent := gbBarSeriesBorder; + FBarSeriesPenFrame.Name := ''; + FBarSeriesPenFrame.Align := alTop; + FBarSeriesPenFrame.BorderSpacing.Left := 8; + FBarSeriesPenFrame.BorderSpacing.Right := 8; + FBarSeriesPenFrame.BorderSpacing.Bottom := 8; + FBarSeriesPenFrame.OnChange := @ChangedHandler; + gbBarSeriesBorder.Caption := 'Bar borders'; + gbBarSeriesBorder.AutoSize := true; + + cbBarShape.DropdownCount := DEFAULT_DROPDOWN_COUNT; + + { Area series page } + FAreaSeriesBrushFrame := TBrushFrame.Create(self); + FAreaSeriesBrushFrame.Parent := gbAreaSeriesBrush; + FAreaSeriesBrushFrame.Name := ''; + FAreaSeriesBrushFrame.Align := alTop; + FAreaSeriesBrushFrame.BorderSpacing.Left := 8; + FAreaSeriesBrushFrame.BorderSpacing.Right := 8; + FAreaSeriesBrushFrame.BorderSpacing.Bottom := 8; + FAreaSeriesBrushFrame.OnChange := @ChangedHandler; + gbAreaSeriesBrush.Caption := 'Area fill'; + gbAreaSeriesBrush.AutoSize := true; + + FAreaSeriesContourPenFrame := TPenFrame.Create(self); + FAreaSeriesContourPenFrame.Parent := gbAreaContourPen; + FAreaSeriesContourPenFrame.Name := ''; + FAreaSeriesContourPenFrame.Align := alTop; + FAreaSeriesContourPenFrame.Top := 1000; + FAreaSeriesContourPenFrame.BorderSpacing.Left := 8; + FAreaSeriesContourPenFrame.BorderSpacing.Right := 8; + FAreaSeriesContourPenFrame.BorderSpacing.Bottom := 8; + FAreaSeriesContourPenFrame.OnChange := @ChangedHandler; + gbAreaContourPen.Caption := 'Border'; + gbAreaContourPen.AutoSize := true; + + FAreaSeriesDropLinesPenFrame := TPenFrame.Create(self); + FAreaSeriesDropLinesPenFrame.Parent := gbAreaDropLinePen; + FAreaSeriesDropLinesPenFrame.Name := ''; + FAreaSeriesDropLinesPenFrame.Align := alTop; + FAreaSeriesDropLinesPenFrame.Top := 1000; + FAreaSeriesDropLinesPenFrame.BorderSpacing.Left := 8; + FAreaSeriesDropLinesPenFrame.BorderSpacing.Right := 8; + FAreaSeriesDropLinesPenFrame.BorderSpacing.Bottom := 8; + FAreaSeriesDropLinesPenFrame.OnChange := @ChangedHandler; + gbAreaDropLinePen.Caption := 'Drop lines'; + gbAreaDropLinePen.AutoSize := true; + + + { for all } BoldHeaders(self); cbLegendMultiplicity.DropdownCount := DEFAULT_DROPDOWN_COUNT; cbMarksStyle.DropdownCount := DEFAULT_DROPDOWN_COUNT; - - LineSeriesPenFrame.OnChange := @ChangedHandler; - BarSeriesPenFrame.OnChange := @ChangedHandler; - BarSeriesBrushFrame.OnChange := @ChangedHandler; end; procedure TSeriesEditor.FormDestroy(Sender: TObject); @@ -178,7 +258,7 @@ procedure TSeriesEditor.cbAreaShowContourLinesChange(Sender: TObject); begin if FSeries is TAreaSeries then begin if cbAreaShowContourLines.Checked then - TAreaSeries(FSeries).AreaContourPen.Style := AreaSeriesContourPenFrame.cbPenStyle.PenStyle + TAreaSeries(FSeries).AreaContourPen.Style := FAreaSeriesContourPenFrame.cbPenStyle.PenStyle else TAreaSeries(FSeries).AreaContourPen.Style := psClear; end; @@ -188,7 +268,7 @@ procedure TSeriesEditor.cbAreaShowDropLinesChange(Sender: TObject); begin if FSeries is TAreaSeries then begin if cbAreaShowDropLines.Checked then - TAreaSeries(FSeries).AreaLinesPen.Style := AreaSeriesDropLinesPenFrame.cbPenStyle.PenStyle + TAreaSeries(FSeries).AreaLinesPen.Style := FAreaSeriesDropLinesPenFrame.cbPenStyle.PenStyle else TAreaSeries(FSeries).AreaLinesPen.Style := psClear; end; @@ -275,14 +355,14 @@ begin nbSeriesTypes.PageIndex := 0; cbLineSeriesShowLines.Checked := TLineSeries(ASeries).ShowLines; cbLineSeriesShowPoints.Checked := TLineSeries(ASeries).ShowPoints; - LineSeriesPenFrame.Prepare(TLineSeries(ASeries).LinePen); - LineSeriesPointerFrame.Prepare(TLineSeries(ASeries).Pointer); + FLineSeriesPenFrame.Prepare(TLineSeries(ASeries).LinePen); + FLineSeriesPointerFrame.Prepare(TLineSeries(ASeries).Pointer); end; if ASeries is TBarSeries then begin nbSeriesTypes.PageIndex := 1; - BarSeriesPenFrame.Prepare(TBarSeries(ASeries).BarPen); - BarSeriesBrushFrame.Prepare(TBarSeries(ASeries).BarBrush); + FBarSeriesPenFrame.Prepare(TBarSeries(ASeries).BarPen); + FBarSeriesBrushFrame.Prepare(TBarSeries(ASeries).BarBrush); cbBarShape.ItemIndex := ord(TBarSeries(ASeries).BarShape); end; @@ -290,9 +370,9 @@ begin nbSeriesTypes.PageIndex := 2; cbAreaShowContourLines.Checked := TAreaSeries(ASeries).AreaContourPen.Style <> psClear; cbAreaShowDropLines.Checked := TAreaSeries(ASeries).AreaLinesPen.Style <> psClear; - AreaSeriesBrushFrame.Prepare(TAreaSeries(ASeries).AreaBrush); - AreaSeriesContourPenFrame.Prepare(TAreaSeries(ASeries).AreaContourPen); - AreaSeriesDropLinesPenFrame.Prepare(TAreaSeries(ASeries).AreaLinesPen); + FAreaSeriesBrushFrame.Prepare(TAreaSeries(ASeries).AreaBrush); + FAreaSeriesContourPenFrame.Prepare(TAreaSeries(ASeries).AreaContourPen); + FAreaSeriesDropLinesPenFrame.Prepare(TAreaSeries(ASeries).AreaLinesPen); end; end;