mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +02:00
TAChart: Use TSeriesPointerStylePropertyEditor in TChartCombobox; some improvements in TSeriesPointerStylePropertyEditor.
git-svn-id: trunk@59735 -
This commit is contained in:
parent
f87a819e21
commit
ec688911e8
@ -10,7 +10,8 @@ implementation
|
||||
|
||||
uses
|
||||
Graphics, Classes, Math, PropEdits, SysUtils, LCLIntf, typinfo,
|
||||
TATypes, TADrawUtils, TADrawerCanvas, TACustomSeries, TASeries, TALegend, TAGraph;
|
||||
TATypes, TADrawUtils, TADrawerCanvas, TACustomSeries, TASeries, TALegend,
|
||||
TAGraph, TAChartCombos;
|
||||
|
||||
type
|
||||
TAxisIndexPropertyEditor = class(TOrdinalPropertyEditor)
|
||||
@ -42,6 +43,8 @@ begin
|
||||
TypeInfo(TChartAxisIndex), TCustomChartSeries, '', TAxisIndexPropertyEditor);
|
||||
RegisterPropertyEditor(
|
||||
TypeInfo(TSeriesPointerStyle), TSeriesPointer, '', TSeriesPointerStylePropertyEditor);
|
||||
RegisterPropertyEditor(
|
||||
TypeInfo(TSeriesPointerStyle), TChartComboBox, '', TSeriespointerStylePropertyEditor);
|
||||
end;
|
||||
|
||||
{ TAxisIndexPropertyEditor }
|
||||
@ -147,13 +150,15 @@ begin
|
||||
oldPenStyle := Pen.Style;
|
||||
|
||||
try
|
||||
{
|
||||
// white out the background
|
||||
Brush.Color := clWindow;
|
||||
FillRect(ARect);
|
||||
}
|
||||
|
||||
// set things up and do work
|
||||
i := GetEnumValue(GetPropInfo^.PropType, CurValue);
|
||||
DrawPointer(ACanvas, lRect, TSeriesPointerStyle(i), clWindowText, clWindow);
|
||||
DrawPointer(ACanvas, lRect, TSeriesPointerStyle(i), clWindowText, clWindowText);
|
||||
finally
|
||||
// restore the things we twiddled with
|
||||
Brush.Color := oldBrushColor;
|
||||
|
Loading…
Reference in New Issue
Block a user