TSlider creating a slider with no sliding space!


I was trying to recreate the TSlider example posted here: classTSlider.html. I slightly modified the xyslider.C macro. The code is attached here.

xyslider.C (729 Bytes)
action.C (441 Bytes)

Here is the comparison of output for both files.

As you can notice there is no sliding space in my plot. Also, the code I attached is almost identical to what is posted on the website. I only changed the histogram part.

I am new to ROOT so I don’t know how to solve it. Please help.

Thank you.

I tried. Indeed it works for me.
Pick the extreme of the slider and reduce it.

I don’t know why but it didn’t work for me. Maybe it is because my computer screen resolution is different. Can you please suggest to me some other GUI which can take input from the canvas?

If you want to zoom on the X and Y axis you do not need any additional GUI. Slide the axis themselves.

In my original script, I want the slider to vary the TLine() on the plot. I don’t want to do it manually because it takes time.

This TLine() I am using to highlight the cuts on the histogram.

Please help to solve this. It would be very helpful.


For me all is fine. when I execute the example here. I get:

Then I can grab the right side of the slider and reduce it. I get:

And I can move it easily .
Sorry, but I do not see any problem.

Ohh! I got it. I didn’t know I have to reduce the size. Thanks for your help.