mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 11:39:36 +01:00
TAChart: Register TStringMultiLinePropertyEditor for TAChartAxisTitle.Caption
git-svn-id: trunk@64803 -
This commit is contained in:
parent
1d097a9a7d
commit
3289f2c7f1
@ -14,7 +14,7 @@ unit TAChartAxisUtils;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Graphics,
|
||||
Classes, Graphics, Controls,
|
||||
TAChartUtils, TACustomSource, TADrawUtils, TAIntervalSources, TAStyles,
|
||||
TATypes, TATextElements;
|
||||
|
||||
@ -39,12 +39,12 @@ type
|
||||
|
||||
TChartAxisTitle = class(TCustomChartAxisTitle)
|
||||
strict private
|
||||
FCaption: String;
|
||||
FCaption: TCaption;
|
||||
FPositionOnMarks: Boolean;
|
||||
FWordwrap: Boolean;
|
||||
|
||||
function GetFont: TFont;
|
||||
procedure SetCaption(AValue: String);
|
||||
procedure SetCaption(AValue: TCaption);
|
||||
procedure SetFont(AValue: TFont);
|
||||
procedure SetPositionOnMarks(AValue: Boolean);
|
||||
procedure SetWordwrap(AValue: Boolean);
|
||||
@ -54,7 +54,7 @@ type
|
||||
public
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
published
|
||||
property Caption: String read FCaption write SetCaption;
|
||||
property Caption: TCaption read FCaption write SetCaption;
|
||||
property Distance default DEF_TITLE_DISTANCE;
|
||||
property Frame;
|
||||
property LabelBrush;
|
||||
@ -282,10 +282,12 @@ type
|
||||
function GraphToImage(AGraph: Double): Integer; override;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Math, SysUtils, LResources,
|
||||
Math, SysUtils, LResources, PropEdits,
|
||||
TAGeometry, TAMath;
|
||||
|
||||
{ TChartMinorAxisMarks }
|
||||
@ -587,7 +589,7 @@ begin
|
||||
Result := LabelFont;
|
||||
end;
|
||||
|
||||
procedure TChartAxisTitle.SetCaption(AValue: String);
|
||||
procedure TChartAxisTitle.SetCaption(AValue: TCaption);
|
||||
begin
|
||||
if FCaption = AValue then exit;
|
||||
FCaption := AValue;
|
||||
@ -828,7 +830,11 @@ begin
|
||||
RegisterPropertyToSkip(TChartAxisTitle, 'Font', FONT_NOTE, '');
|
||||
end;
|
||||
|
||||
initialization
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterPropertyEditor(
|
||||
TypeInfo(TCaption), TChartAxisTitle, '', TStringMultilinePropertyEditor);
|
||||
SkipObsoleteProperties;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@ -151,6 +151,7 @@
|
||||
</Item26>
|
||||
<Item27>
|
||||
<Filename Value="tachartaxisutils.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="TAChartAxisUtils"/>
|
||||
</Item27>
|
||||
<Item28>
|
||||
|
||||
@ -35,6 +35,7 @@ begin
|
||||
RegisterUnit('TALegendPanel', @TALegendPanel.Register);
|
||||
RegisterUnit('TANavigation', @TANavigation.Register);
|
||||
RegisterUnit('TAIntervalSources', @TAIntervalSources.Register);
|
||||
RegisterUnit('TAChartAxisUtils', @TAChartAxisUtils.Register);
|
||||
RegisterUnit('TAChartListbox', @TAChartListbox.Register);
|
||||
RegisterUnit('TAChartExtentLink', @TAChartExtentLink.Register);
|
||||
RegisterUnit('TAToolEditors', @TAToolEditors.Register);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user