Scrolling

Discussion and support relating to Data Tree

Moderators: worcestersource, heatherlaine

Post Reply
interactbooks
Posts: 65
Joined: Thu Oct 07, 2010 4:47 pm

Scrolling

Post by interactbooks » Sat Feb 26, 2011 6:34 pm

I have a tree that is larger than my screen size. When a user updates a node in the tree I need the tree refreshed and then I want to jump to the node they were working on. This works well when the node is in view, but if the node they are working on has to be scrolled to when the tree is refreshed the screen does not automatically scroll to the node. Is there a way to scroll automatically to the node?

worcestersource
Posts: 24
Joined: Wed Mar 17, 2010 3:51 pm
Location: Worcester, UK
Contact:

Re: Scrolling

Post by worcestersource » Tue Mar 01, 2011 6:40 pm

Hi there,

You should be able to make the tree scroll to a node by selecting it with the dt_activeNode command.

The command has three parameters, being:

1. the id of the target tree group
2. the id of the node being edited
3. whether you want to suppress the redraw (leave empty or "false" if you want the tree to redraw)

In this case, if the correct node is already selected, you can quickly find its id with the dt_getGeneralProperty function. For example, dt_getGeneralProperty(id of control "my tree","active node ID") .

Hope this helps,


Steve
http://www.theworcestersource.com - home of Data Tree, a tree control for LiveCode

Post Reply

Return to “Data Tree”