HI I'd like to add a script to a next and prev button (that also responds to a key combo) that will move the selection in the tree and (i) send a nodeup (which triggers my scripts) and (ii) actually acts like it has been clicked ie is hilited and the formatting script in mousedown is run.
At the moment I can get different nodes to be 'worked on' in script but can't get the hiliting etc of the new node.
Thanks for any advice
How to select next/prev node in script?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: How to select next/prev node in script?
Hi Lumpo!
To hilite a node you can use the hilitedNodeIDs Tree property. Just set this property to the ID of the node that you want to select. It is not necessary to refresh the Tree. A script could look like this:
With my best regards
Mats
To hilite a node you can use the hilitedNodeIDs Tree property. Just set this property to the ID of the node that you want to select. It is not necessary to refresh the Tree. A script could look like this:
Code: Select all
on nodeUp theButton theNodeID
set the hilitedNodeIDs of me to 7
end nodeUp
Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects