Page 1 of 1

TColorBandTool:OnClick breaks dragging functionality

Posted: Wed May 20, 2015 10:48 am
by 16570767
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

Re: TColorBandTool:OnClick breaks dragging functionality

Posted: Wed May 20, 2015 3:37 pm
by yeray
Hi Jens,

You are right. I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1218