Sticky Tools

How do I get a tool to remain sticky?

For example: the pan tool, once activated, remains the active tool until I specify otherwise.

But the zoomtool is only active until a mouse up / zoom. Then the pointer tool takes the active role immediately, even though I'm not doing so programatically.

What should I look for to make the tool stay active.

For example, I'd like the zoom tool to remain active after zooming.

Is there something in the tool code I need to override?



3 Replies

ER Eric Robishaw February 9, 2009 07:57 PM UTC

In answer to my own question: the property SingleActionTool defines whether a tool sticks

However, this does not work with the zoom tool

Using the diagram builder example, you can see that selecting the zoom tool and ensuring that "SingleActionTool = false", then zooming with the tool, reverts back to the pointer when done.

This appears to be a bug.


>How do I get a tool to remain sticky?

For example: the pan tool, once activated, remains the active tool until I specify otherwise.

But the zoomtool is only active until a mouse up / zoom. Then the pointer tool takes the active role immediately, even though I'm not doing so programatically.

What should I look for to make the tool stay active.

For example, I'd like the zoom tool to remain active after zooming.

Is there something in the tool code I need to override?






AM Ajeet M Syncfusion Team February 10, 2009 10:23 AM UTC

Hi Eric,

I have had checked this issue. I am afraid but I was not able to reproduce this issue.

For your convenience, I am attaching a sample file with two buttons. One activates CustomZoom Tool, with explicit declaration of "SingleActionTool = false"; and the other activates the Standard Zoom Tool.

The Tool does not get detached after MouseUp()or Zoom and stays until another tool replaces this.

The sample is here at:
http://www.syncfusion.com/support/user/uploads/Diagram_WF_CustomZoom_c92f3f6a.zip

Diagram_WF_CustomZoom.zip




ER Eric Robishaw February 16, 2009 08:09 PM UTC

Thanks,

I discovered for some reason that by default, the ZoomTool was defaulting to SIngleAction = true. So once I explicitly changed it, it worked fine.




Loader.
Up arrow icon