# How to trap mouse middle button clicks on a Histogram in a TCanvas

**URL:** <https://root-forum.cern.ch/t/how-to-trap-mouse-middle-button-clicks-on-a-histogram-in-a-tcanvas/19456>\
**Category:** ROOT\
**Created:** [July 1, 2015, 1:05pm UTC](https://root-forum.cern.ch/t/how-to-trap-mouse-middle-button-clicks-on-a-histogram-in-a-tcanvas/19456 "2015-07-01T13:05:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 2, 2015, 7:35am UTC](https://root-forum.cern.ch/t/how-to-trap-mouse-middle-button-clicks-on-a-histogram-in-a-tcanvas/19456/2 "2015-07-02T07:35:30Z")

</div>

See:

> [@gPad-\>GetEventX() to axis range](https://root-forum.cern.ch/t/gpad-geteventx-to-axis-range/9838/2):
>
> Have a look at $ROOTSYS/tutorials/graphics/mandelbrot.C

> [@How too find out which bin was clicked in a TH2D histogram](https://root-forum.cern.ch/t/how-too-find-out-which-bin-was-clicked-in-a-th2d-histogram/7012/2):
>
> Hi, You can take a look at these tutorials: graphics/triangles.C, hist/exec2.C, hist/DynamicSlice.C and graphics/mandelbrot.C Cheers, Bertrand.

> [@Mandelbrot macro](https://root-forum.cern.ch/t/mandelbrot-macro/4520/1):
>
> Dear all, while preparing a small ROOT course, I have written the following macro, that draws the fractal Mandelbrot set, and allows for zoom/unzoom operations. Runs with root mandelbrot.C+ I attach the macro and a screenhsot, just in case someone is interested (maybe a new ROOT tutorial on TExec/TComplex ? [8)] ) Bye Luigi [mandelbrot.C](https://root-forum.cern.ch/uploads/default/original/2X/8/8a1d3d612e8ad03cebed5a7931fcee757e2a8dfa.C) (3.24 KB)

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-trap-mouse-middle-button-clicks-on-a-histogram-in-a-tcanvas/19456)._
