TColorBandTool:OnClick breaks dragging functionality

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
jens.mertelmeyer
Newbie
Newbie
Posts: 31
Joined: Fri Nov 21, 2014 12:00 am

TColorBandTool:OnClick breaks dragging functionality

Post by jens.mertelmeyer » Wed May 20, 2015 10:48 am

Hi there.

Short Version:
By using TColorBandTool.OnClick on a tool that is draggable, dragging begins before OnClick but never ends.

Long version:

I am using a TColorBandTool for some kind of editor functionality: The user can select some area of a chart, this then gets highlighted by a TColorBandTool. The TColorBandTool needs to be draggable (AllowDrag = True).

I would like to implement a click and a right-click event on the TColorBandTool. I cant: 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. The real problem that the dragging also kicks in: Let's image I spawn a "Remove selection?" dialog upon clicking? Upon leaving this dialog, the dragging is still active and the TColorBandtool will now stalk the users mouse until the end of time.

Is there an option besides disabling AllowDrag and implementing a dragging functionality manually?

Using TeeChart 2014.12 Pro. I attached a minimal example.

Many thanks in advance
Attachments
TColorBandTool_OnClick.zip
(1.99 KiB) Downloaded 770 times

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: TColorBandTool:OnClick breaks dragging functionality

Post by Yeray » Wed May 20, 2015 3:37 pm

Hi Jens,

You are right. I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1218
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply