here is a very basic thing.
I want to use a double click event, but I cannot get it fired:
For reproduce
create a new project
add a Tchart
add a TchartEditorPanel
write a doubleClickEvent for TChartEditorPanel
=> start the program, double click the panel
here: nothing happens
The same with the click event.
this time it is very easy to add a sample code:
the code:
Code: Select all
unit Unit7;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, VCLTee.TeeEdit,
VCLTee.TeEngine, Vcl.ExtCtrls, VCLTee.TeeProcs, VCLTee.Chart;
type
TForm7 = class(TForm)
Chart1: TChart;
ChartEditorPanel1: TChartEditorPanel;
procedure ChartEditorPanel1DblClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form7: TForm7;
implementation
{$R *.dfm}
procedure TForm7.ChartEditorPanel1DblClick(Sender: TObject);
begin
ShowMessage('Why ist this event not fired on double click?');
end;
end.
=================================
the form:
Code: Select all
object Form7: TForm7
Left = 0
Top = 0
Caption = 'Form7'
ClientHeight = 674
ClientWidth = 820
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 120
TextHeight = 16
object Chart1: TChart
Left = 128
Top = 48
Width = 657
Height = 569
BackWall.Brush.Gradient.Direction = gdBottomTop
BackWall.Brush.Gradient.EndColor = clWhite
BackWall.Brush.Gradient.StartColor = 15395562
BackWall.Brush.Gradient.Visible = True
BackWall.Transparent = False
Foot.Font.Name = 'Verdana'
Gradient.Direction = gdBottomTop
Gradient.EndColor = clWhite
Gradient.MidColor = 15395562
Gradient.StartColor = 15395562
Gradient.Visible = True
LeftWall.Color = 14745599
Legend.Font.Name = 'Verdana'
RightWall.Color = 14745599
SubFoot.Font.Name = 'Verdana'
SubTitle.Font.Name = 'Verdana'
Title.Font.Name = 'Verdana'
Title.Text.Strings = (
'TChart')
BottomAxis.Axis.Color = 4210752
BottomAxis.Grid.Color = 11119017
BottomAxis.LabelsFont.Name = 'Verdana'
BottomAxis.TicksInner.Color = 11119017
BottomAxis.Title.Font.Name = 'Verdana'
DepthAxis.Axis.Color = 4210752
DepthAxis.Grid.Color = 11119017
DepthAxis.LabelsFont.Name = 'Verdana'
DepthAxis.TicksInner.Color = 11119017
DepthAxis.Title.Font.Name = 'Verdana'
DepthTopAxis.Axis.Color = 4210752
DepthTopAxis.Grid.Color = 11119017
DepthTopAxis.LabelsFont.Name = 'Verdana'
DepthTopAxis.TicksInner.Color = 11119017
DepthTopAxis.Title.Font.Name = 'Verdana'
LeftAxis.Axis.Color = 4210752
LeftAxis.Grid.Color = 11119017
LeftAxis.LabelsFont.Name = 'Verdana'
LeftAxis.TicksInner.Color = 11119017
LeftAxis.Title.Font.Name = 'Verdana'
RightAxis.Axis.Color = 4210752
RightAxis.Grid.Color = 11119017
RightAxis.LabelsFont.Name = 'Verdana'
RightAxis.TicksInner.Color = 11119017
RightAxis.Title.Font.Name = 'Verdana'
TopAxis.Axis.Color = 4210752
TopAxis.Grid.Color = 11119017
TopAxis.LabelsFont.Name = 'Verdana'
TopAxis.TicksInner.Color = 11119017
TopAxis.Title.Font.Name = 'Verdana'
TabOrder = 0
DefaultCanvas = 'TGDIPlusCanvas'
ColorPaletteIndex = 13
object ChartEditorPanel1: TChartEditorPanel
Left = 208
Top = 200
Width = 409
Height = 291
TabOrder = 0
OnDblClick = ChartEditorPanel1DblClick
end
end
end
Cheryll