Page 1 of 1

Raw key events and rTree

Posted: Wed Feb 05, 2014 6:32 am
by jameshale
In a V1 rTree one could assign the focus to the rTree and then respond to arrow keys (on the keyboard) and move around the tree.

V2 of rTree is now a "group"rather than a control and the focus command no longer wants to work, telling me the object is of an invalid type.
I tried focussing on the background field within the rTree group but this didn't work.

Ideas?

James

Re: Raw key events and rTree

Posted: Wed Feb 05, 2014 3:11 pm
by wilstrand
Hi James!

Try setting the "tabGroupBehavior" of the rTree group to false. V2 has arrow key navigation built in and it should work "out of the box" if you set "tabGroupBehavior" to false.

All the best
Mats

Re: Raw key events and rTree

Posted: Wed Feb 05, 2014 3:15 pm
by jameshale
But how do I keep the focus in the tree?
Well, how do I get it there to begin with?

Re: Raw key events and rTree

Posted: Wed Feb 05, 2014 3:20 pm
by wilstrand
James,

You should be able to focus the "BackgroundField" as you suggested.

Code: Select all

focus fld "BackgroundField" of grp "rTree"
Does that work for you?

Best
Mats

Re: Raw key events and rTree

Posted: Thu Feb 06, 2014 2:08 am
by jameshale
yes it did work. Not sure what i did before??

anyway further discussion continued in the post "How to upgrade from V1.x to V2? "

james