Keeping objects Horizontal

Hi Rooters,
We use horizontal arrows on 1D histograms to graphically select subranges. We want the arrows to remain horiziontal when dragging the left or right side. I am thinking of trying an arrow inside an “invisible” box; is there a better way?
Cheers,
Steve Alam

We could implement an option in TArrow to force it vertical or horizontal.

Rene

Rene,
That would be wonderful (and there is no rush).
Cheers,
Steve

Yes we could use the shift modifier key for that to force any movement to be either horizontal or vertical.

– Fons

Well, we should agree on what we should do. Some intial idea was to add an enum in TLine with (kVertical, kHorizontal) mapped to the TObject bits to force an arrow/line to be vertical or horizontal. In that case the verticality or horizontality would be an attribute of TLine which means it would be possible to set a line vertical or horizontal inside a macro.

What you are proposing here is only at the GUI level. Fine with me, but we shoudl agree, because I already started to implement the “attribute way”. That is not trivial because DistancetoPrimitves, ExcuteEvent, Paint etc … must be changed in TLine and TArrow. Also there are tricky cases to handle like setting horizontal a line having x1=x2 (wihtout the vertical flag). So before going further I would like to be sure we agree on what should be done.

Olivier,

Go on as we discussed this morning with the enum, etc.
This attribute must be persistent.

Rene

Hi All,
Persistant meets my needs best. Thanks again.
Cheers,
Steve Alam

Hi Steve,

I will go on this way.

Cheers, Olivier