Page 1 of 1

Node textShift syntax

Posted: Tue May 31, 2011 8:42 pm
by Clarkey
Hi Mats,
Please can you confirm the syntax needed for textShift to adjust node text relative to the node icons? I'm using large icons and want to have the node text aligned with the icon's centre-line. The following line seems to have no effect?

set the textShift_of_node_ID_[it] of control "Tree" to -4
Best,
Keith..

Re: Node textShift syntax

Posted: Tue May 31, 2011 9:37 pm
by wilstrand
Hi Keith!

I assume you are uing the latest version of rTree wich is 1.5.1.

I have just tested the textShift feature with the following script in a button:

Code: Select all

on mouseUp
   dispatch "new_node" to control "Tree"
   get the lastNodeID of control "Tree"
   set the textShift_of_node_ID_[it] of control "Tree" to - 4
   dispatch "renderTree" to control "Tree"
end mouseUp
I confirm that this is working as intended. The text (name) of the node is shifted 4 pixels up relative to the icon/icons.
Please let me know if you still have problems or if you have got it working!

With my best regards,
Mats

Re: Node textShift syntax

Posted: Wed Jun 01, 2011 7:10 am
by Clarkey
Hi Mats,
wilstrand wrote:I assume you are uing the latest version of rTree wich is 1.5.1.
Aha! That'll be it then, as I was still on v 1.5 - right code, wrong version!

This brings a couple of follow-up questions:
1. Is there any way to adjust the relative vertical placement of icons 1 & 2 - so that a small disclosure triangle firstIcon can be aligned with the centre-line of a larger node-specific secondIcon?

2. Is there a smarter and/or less manual way to upgrade than the process I used?
• Delete rTree Engine SubStack from project MainStack
• Open new rTree Workbench 1.5.1 stackfile
• Change the MainStack of it's rTree Engine SubStack to the project MainStack
• Close and remove from memory the rTree Workbench stackfile

Best,
Keith..

Re: Node textShift syntax

Posted: Wed Jun 01, 2011 8:52 am
by wilstrand
Hi Keith!
1. Is there any way to adjust the relative vertical placement of icons 1 & 2 - so that a small disclosure triangle firstIcon can be aligned with the centre-line of a larger node-specific secondIcon?
Ther is no specific rTree 1.5 property for this. This is a planned feature of rTree 2.0.
2. Is there a smarter and/or less manual way to upgrade than the process I used?
• Delete rTree Engine SubStack from project MainStack
• Open new rTree Workbench 1.5.1 stackfile
• Change the MainStack of it's rTree Engine SubStack to the project MainStack
• Close and remove from memory the rTree Workbench stackfile
I agree that this is a little awkward but this is the way you have to do it. Some users prefer to do this from the message box also.

With my best regards
Mats

Re: Node textShift syntax

Posted: Wed Jun 01, 2011 9:06 am
by Clarkey
Hi Mats,
Thanks for the clarifications.
Best,
Keith..