![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | TColorBandTool OnClick event is fired before releasing the mouse button | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Tools | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | david |
| Priority: | --- | ||
| Version: | 140923 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| URL: | http://www.teechart.net/support/viewtopic.php?f=3&t=15592 | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | test case | ||
Fixed. Now the OnClick event is called on mouse-up, and only when the colorband has not been dragged. Created attachment 451 [details]
test case
|
The customer explains it well: "Although it has an event that is named OnClick, it is some kind of a OnMouseDown-event: It gets triggered immediately, even when the mouse button is still down" Simple code to reproduce the issue: uses Series, TeeTools; procedure TForm1.FormCreate(Sender: TObject); begin Chart1.View3D:=false; Chart1.Legend.Visible:=false; Chart1.AddSeries(TLineSeries).FillSampleValues; with Chart1.Tools.Add(TColorBandTool) as TColorBandTool do begin Axis:=Chart1.Axes.Bottom; StartValue:=5; EndValue:=10; OnClick:=ColorBandClick; end; end; procedure TForm1.ColorBandClick(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin ShowMessage('ColorBand Clicked'); end;