Raw key events and rTree

This is a forum focused on providing support for rTree

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Raw key events and rTree

Post by jameshale » Wed Feb 05, 2014 6:32 am

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

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: Raw key events and rTree

Post by wilstrand » Wed Feb 05, 2014 3:11 pm

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
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Raw key events and rTree

Post by jameshale » Wed Feb 05, 2014 3:15 pm

But how do I keep the focus in the tree?
Well, how do I get it there to begin with?

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: Raw key events and rTree

Post by wilstrand » Wed Feb 05, 2014 3:20 pm

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
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Raw key events and rTree

Post by jameshale » Thu Feb 06, 2014 2:08 am

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

Locked

Return to “rTree”