Page 1 of 1

scrolling an rTree in the same way as a text field

Posted: Sun Jul 01, 2012 8:55 am
by jameshale
When I place the cursor over a text field and scroll (i.e use a scroll wheel or two finger drag) the text in the field scrolls.
If I do the same thing over an rTree object it doesn't.
I have to actually click and drag on the scrollbars to get the "field" scrolling.

Can I get it to behave like a text field?

James

Re: scrolling an rTree in the same way as a text field

Posted: Sun Jul 01, 2012 9:01 pm
by Mark
Hi James,

You can problaby catch the rawKeyUp message, check the target and if the target is the long id of the tree (group or field) then you can change the scroll of that group or field. If that doesn't work, then try a front script.

Kind regards,

Mark

Re: scrolling an rTree in the same way as a text field

Posted: Mon Jul 02, 2012 3:12 am
by jameshale
Thanks Mark,

Set me on the right track.
I had inadvertantly stopped this behaviour in my text field by trapping the rawkeydown as I didn't want any text added or modified in the field but wanted user to still be able to select text. Seems when the field has its text locked only lines can be selected.
I then put the the raw key value as I "scrolled" and noted the values (65308 and 65309).

Looking at my rTree object I noted that I was already switching on a rawKeyDown event to provide arrow key control so I just added cases to pass the scroll values.

works a treat.

Thanks again.