mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-25 18:01:37 +02:00
TAChart: Fix OnChange event of ChartCombobox, cleanup.
git-svn-id: trunk@54104 -
This commit is contained in:
parent
fc0fa876ba
commit
5da59b1367
@ -62,8 +62,10 @@ msgid "backward-diagonal hatch"
|
|||||||
msgstr "rückwärts diagonal"
|
msgstr "rückwärts diagonal"
|
||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
|
#, fuzzy
|
||||||
|
#| msgid "clear fill"
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr "ohne Füllung"
|
msgstr "ohne Füllung"
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -283,8 +285,10 @@ msgid "Polar series"
|
|||||||
msgstr "Polar-Diagramm"
|
msgstr "Polar-Diagramm"
|
||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
|
#, fuzzy
|
||||||
|
#| msgid "clear line"
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr "keine Linie"
|
msgstr "keine Linie"
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
@ -392,3 +396,4 @@ msgstr "Fehler beim Umbenennen von Komponenten: %s"
|
|||||||
#: tachartstrconsts.tastoolseditortitle
|
#: tachartstrconsts.tastoolseditortitle
|
||||||
msgid "Edit tools"
|
msgid "Edit tools"
|
||||||
msgstr "Werkzeuge bearbeiten"
|
msgstr "Werkzeuge bearbeiten"
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -272,7 +272,7 @@ msgstr "Napakuvaaja"
|
|||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
|
|||||||
@ -61,7 +61,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -282,7 +282,7 @@ msgstr "Séries polaires"
|
|||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
|
|||||||
@ -61,7 +61,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -282,7 +282,7 @@ msgstr "Polár"
|
|||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
|
|||||||
@ -51,7 +51,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -272,7 +272,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
|
|||||||
@ -61,7 +61,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -282,7 +282,7 @@ msgstr "Лепестковая диаграмма"
|
|||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
|
|||||||
@ -62,7 +62,7 @@ msgstr ""
|
|||||||
|
|
||||||
#: tachartstrconsts.rsbsclear
|
#: tachartstrconsts.rsbsclear
|
||||||
msgctxt "tachartstrconsts.rsbsclear"
|
msgctxt "tachartstrconsts.rsbsclear"
|
||||||
msgid "clear fill"
|
msgid "no fill"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsbscross
|
#: tachartstrconsts.rsbscross
|
||||||
@ -285,7 +285,7 @@ msgstr "Polardiagram"
|
|||||||
|
|
||||||
#: tachartstrconsts.rspsclear
|
#: tachartstrconsts.rspsclear
|
||||||
msgctxt "tachartstrconsts.rspsclear"
|
msgctxt "tachartstrconsts.rspsclear"
|
||||||
msgid "clear line"
|
msgid "no line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rspsdash
|
#: tachartstrconsts.rspsdash
|
||||||
|
|||||||
@ -11,96 +11,6 @@ const
|
|||||||
DEFAULT_DROPDOWN_COUNT = 24;
|
DEFAULT_DROPDOWN_COUNT = 24;
|
||||||
|
|
||||||
type
|
type
|
||||||
(*
|
|
||||||
TSeriesPointerStyleCombobox = class(TCustomCombobox)
|
|
||||||
private
|
|
||||||
FSelected : TSeriesPointerStyle;
|
|
||||||
FSymbolBordercolor : TColor;
|
|
||||||
FSymbolFillColor : TColor;
|
|
||||||
FShowNames : boolean;
|
|
||||||
FAlignment : TAlignment;
|
|
||||||
FBitmaps: array[TSeriespointerStyle] of TBitmap;
|
|
||||||
procedure SetAlignment(Value:TAlignment);
|
|
||||||
procedure SetSelected(AValue: TSeriesPointerStyle);
|
|
||||||
procedure SetShowNames(AValue: boolean);
|
|
||||||
procedure SetSymbolBorderColor(AValue: TColor);
|
|
||||||
procedure SetSymbolFillColor(AValue: TColor);
|
|
||||||
protected
|
|
||||||
procedure CreateBitmaps(AWidth, AHeight: Integer);
|
|
||||||
procedure DrawItem(AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); override;
|
|
||||||
procedure DestroyBitmaps;
|
|
||||||
procedure GetItems; override;
|
|
||||||
function GetSymbol(AIndex: Integer): TSeriesPointerStyle; inline;
|
|
||||||
procedure RealSetText(const AValue: TCaption); override;
|
|
||||||
procedure SetItemIndex(const AValue: Integer); override;
|
|
||||||
public
|
|
||||||
constructor Create(AOwner: TComponent); override;
|
|
||||||
destructor Destroy; override;
|
|
||||||
published
|
|
||||||
// new properties
|
|
||||||
property Selected : TSeriesPointerStyle read FSelected write SetSelected default DEFAULT_POINTER_STYLE;
|
|
||||||
property ShowNames : boolean read FShowNames write SetShowNames default true;
|
|
||||||
property SymbolBorderColor : TColor read FSymbolBorderColor write SetSymbolBorderColor default clBlack;
|
|
||||||
property SymbolFillColor : TColor read FSymbolFillColor write SetSymbolFillColor default clWhite;
|
|
||||||
property Alignment : TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
|
||||||
|
|
||||||
// inherited
|
|
||||||
property Align;
|
|
||||||
property Anchors;
|
|
||||||
property BiDiMode;
|
|
||||||
property BorderSpacing;
|
|
||||||
property Constraints;
|
|
||||||
property DragKind;
|
|
||||||
property ParentBiDiMode;
|
|
||||||
property AutoDropDown default False;
|
|
||||||
property CharCase;
|
|
||||||
property Color;
|
|
||||||
property DragMode;
|
|
||||||
property DragCursor;
|
|
||||||
property DropDownCount default DEFAULT_DROPDOWN_COUNT;
|
|
||||||
property Enabled;
|
|
||||||
property Font;
|
|
||||||
property ItemHeight;
|
|
||||||
property ItemWidth;
|
|
||||||
property Left;
|
|
||||||
property ParentColor;
|
|
||||||
property ParentFont;
|
|
||||||
property ParentShowHint;
|
|
||||||
property PopupMenu;
|
|
||||||
property ShowHint;
|
|
||||||
property TabOrder;
|
|
||||||
property TabStop;
|
|
||||||
property Top;
|
|
||||||
property Visible;
|
|
||||||
property Width;
|
|
||||||
property OnChange;
|
|
||||||
property OnClick;
|
|
||||||
property OnCloseUp;
|
|
||||||
property OnContextPopup;
|
|
||||||
property OnDblClick;
|
|
||||||
property OnEnter;
|
|
||||||
property OnExit;
|
|
||||||
property OnKeyDown;
|
|
||||||
property OnKeyPress;
|
|
||||||
property OnKeyUp;
|
|
||||||
property OnDragDrop;
|
|
||||||
property OnDragOver;
|
|
||||||
property OnDropDown;
|
|
||||||
property OnEndDrag;
|
|
||||||
property OnEndDock;
|
|
||||||
property OnMouseEnter;
|
|
||||||
property OnMouseLeave;
|
|
||||||
property OnMouseMove;
|
|
||||||
property OnMouseUp;
|
|
||||||
property OnMouseWheel;
|
|
||||||
property OnMouseWheelDown;
|
|
||||||
property OnMouseWheelUp;
|
|
||||||
property OnSelect;
|
|
||||||
property OnStartDock;
|
|
||||||
property OnStartDrag;
|
|
||||||
property OnUTF8KeyPress;
|
|
||||||
end;
|
|
||||||
*)
|
|
||||||
TChartComboMode = (ccmPointerStyle, ccmPenStyle, ccmPenWidth, ccmBrushStyle);
|
TChartComboMode = (ccmPointerStyle, ccmPenStyle, ccmPenWidth, ccmBrushStyle);
|
||||||
|
|
||||||
TChartComboBox = class(TCustomComboBox)
|
TChartComboBox = class(TCustomComboBox)
|
||||||
@ -135,6 +45,7 @@ type
|
|||||||
procedure SetShowNames(const AValue: Boolean);
|
procedure SetShowNames(const AValue: Boolean);
|
||||||
procedure SetSymbolWidth(const AValue: Integer);
|
procedure SetSymbolWidth(const AValue: Integer);
|
||||||
protected
|
protected
|
||||||
|
procedure Change; override;
|
||||||
procedure CreateBitmaps(AWidth, AHeight: Integer);
|
procedure CreateBitmaps(AWidth, AHeight: Integer);
|
||||||
procedure DestroyBitmaps;
|
procedure DestroyBitmaps;
|
||||||
procedure DrawItem(AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); override;
|
procedure DrawItem(AIndex: Integer; ARect: TRect; AState: TOwnerDrawState); override;
|
||||||
@ -151,8 +62,6 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure ApplyToPen(APen: TPen);
|
|
||||||
procedure ExtractFromPen(APen: TPen);
|
|
||||||
procedure SetPenPattern(APen: TPen); overload;
|
procedure SetPenPattern(APen: TPen); overload;
|
||||||
published
|
published
|
||||||
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
||||||
@ -171,16 +80,9 @@ type
|
|||||||
|
|
||||||
property Align;
|
property Align;
|
||||||
property Anchors;
|
property Anchors;
|
||||||
// property ArrowKeysTraverseList;
|
|
||||||
// property AutoComplete;
|
|
||||||
// property AutoCompleteText;
|
|
||||||
property AutoDropDown;
|
property AutoDropDown;
|
||||||
// property AutoSelect;
|
|
||||||
// property AutoSize;// Note: windows has a fixed height in some styles
|
|
||||||
property BidiMode;
|
property BidiMode;
|
||||||
property BorderSpacing;
|
property BorderSpacing;
|
||||||
// property BorderStyle;
|
|
||||||
// property CharCase;
|
|
||||||
property Color;
|
property Color;
|
||||||
property Constraints;
|
property Constraints;
|
||||||
property Cursor;
|
property Cursor;
|
||||||
@ -192,16 +94,13 @@ type
|
|||||||
property Font;
|
property Font;
|
||||||
property ItemHeight;
|
property ItemHeight;
|
||||||
property ItemIndex;
|
property ItemIndex;
|
||||||
// property Items;
|
|
||||||
property ItemWidth;
|
property ItemWidth;
|
||||||
property Left;
|
property Left;
|
||||||
// property MaxLength;
|
|
||||||
property ParentBidiMode;
|
property ParentBidiMode;
|
||||||
property ParentColor;
|
property ParentColor;
|
||||||
property ParentFont;
|
property ParentFont;
|
||||||
property ParentShowHint;
|
property ParentShowHint;
|
||||||
property PopupMenu;
|
property PopupMenu;
|
||||||
// property ReadOnly;
|
|
||||||
property ShowHint;
|
property ShowHint;
|
||||||
property TabOrder;
|
property TabOrder;
|
||||||
property TabStop;
|
property TabStop;
|
||||||
@ -223,7 +122,6 @@ type
|
|||||||
property OnEditingDone;
|
property OnEditingDone;
|
||||||
property OnEnter;
|
property OnEnter;
|
||||||
property OnExit;
|
property OnExit;
|
||||||
// property OnGetItems;
|
|
||||||
property OnKeyDown;
|
property OnKeyDown;
|
||||||
property OnKeyPress;
|
property OnKeyPress;
|
||||||
property OnKeyUp;
|
property OnKeyUp;
|
||||||
@ -600,6 +498,7 @@ begin
|
|||||||
FSymbolWidth := DEFAULT_SYMBOL_WIDTH;
|
FSymbolWidth := DEFAULT_SYMBOL_WIDTH;
|
||||||
PopulatePenStyles;
|
PopulatePenStyles;
|
||||||
SetSelectedPenStyle(FPenStyle);
|
SetSelectedPenStyle(FPenStyle);
|
||||||
|
GetItems;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TChartCombobox.Destroy;
|
destructor TChartCombobox.Destroy;
|
||||||
@ -608,15 +507,10 @@ begin
|
|||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartComboBox.ApplyToPen(APen: TPen);
|
procedure TChartCombobox.Change;
|
||||||
begin
|
begin
|
||||||
if Assigned(APen) then begin
|
SetItemIndex(ItemIndex);
|
||||||
APen.Style := FPenStyle;
|
inherited;
|
||||||
APen.Color := FPenColor;
|
|
||||||
APen.Cosmetic := FCosmetic;
|
|
||||||
APen.SetPattern(FPenPattern);
|
|
||||||
APen.Width := FPenWidth;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartCombobox.CreateBitmaps(AWidth, AHeight: Integer);
|
procedure TChartCombobox.CreateBitmaps(AWidth, AHeight: Integer);
|
||||||
@ -789,17 +683,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChartComboBox.ExtractFromPen(APen: TPen);
|
|
||||||
begin
|
|
||||||
if Assigned(APen) then begin
|
|
||||||
FCosmetic := APen.Cosmetic;
|
|
||||||
FPenPattern := APen.GetPattern;
|
|
||||||
FPenColor := APen.Color;
|
|
||||||
FPenStyle := APen.Style;
|
|
||||||
FPenWidth := APen.Width;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TChartCombobox.GetBrushStyle(const AIndex: Integer): TBrushStyle;
|
function TChartCombobox.GetBrushStyle(const AIndex: Integer): TBrushStyle;
|
||||||
begin
|
begin
|
||||||
if AIndex < 0 then
|
if AIndex < 0 then
|
||||||
|
|||||||
@ -108,7 +108,7 @@ resourcestring
|
|||||||
rsPSDashDotDot = 'dash-dot-dot';
|
rsPSDashDotDot = 'dash-dot-dot';
|
||||||
rsPSInsideFrame = 'solid (inside frame)';
|
rsPSInsideFrame = 'solid (inside frame)';
|
||||||
rsPSPattern = 'patterned line';
|
rsPSPattern = 'patterned line';
|
||||||
rsPSClear = 'clear line';
|
rsPSClear = 'no line';
|
||||||
|
|
||||||
rsBSSolid = 'solid fill';
|
rsBSSolid = 'solid fill';
|
||||||
rsBSHorizontal = 'horizontally hatched';
|
rsBSHorizontal = 'horizontally hatched';
|
||||||
@ -117,7 +117,7 @@ resourcestring
|
|||||||
rsBSBDiagonal = 'backward-diagonal hatch';
|
rsBSBDiagonal = 'backward-diagonal hatch';
|
||||||
rsBSCross = 'crossed';
|
rsBSCross = 'crossed';
|
||||||
rsBSDiagCross = 'diagonally crossed';
|
rsBSDiagCross = 'diagonally crossed';
|
||||||
rsBSClear = 'clear fill';
|
rsBSClear = 'no fill';
|
||||||
rsBSImage = 'image fill';
|
rsBSImage = 'image fill';
|
||||||
rsBSPattern = 'pattern fill';
|
rsBSPattern = 'pattern fill';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user