[Xerte] Positioning icons relative to the previous icon.

Paul Swanson Paul.Swanson at harlandfs.com
Wed Nov 19 23:02:25 GMT 2008

Yes, _ytile + 11 worked (I have setGutter at 5, plus the border line
height to take into account). And icon.previousSibling.clip()._y for the
adjacent cells on the same row. I guess my expression was just missing
the clip() method. I had tried both _y and y.
Patrick, I'm setting this on the property panel of the text icon, not in
a script. The script just draws the border and sets the gutter.
Geez, don't you guys ever sleep? It must be 11pm in the UK! Thanks for
the speedy response!


	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
	Sent: Wednesday, November 19, 2008 2:08 PM
	To: Xerte discussion list
	Subject: RE: [Xerte] Positioning icons relative to the previous
	try _ytile
	It gives you the value of icon.previousSibling.clip()._y +
icon.previousSibling.clip()._height. I usually put _ytile + 10 in the y


	From: xerte-bounces at lists.nottingham.ac.uk on behalf of Paul
	Sent: Wed 19/11/2008 21:59
	To: Xerte discussion list
	Subject: [Xerte] Positioning icons relative to the previous

	I'm attempting to build a table using multiple text icons. I'm
using individual text icons for each cell in combination with drawBorder
in a script icon. I've been manually computing the y coordinate by
adding the height of the previous icon to the y coordinate of the
previous icon. It's time consuming, and I'm thinking there must be a
better way. I've tried variations of icon.previousSibling._y, but it
seems to be returning 0 (or, more likely, undefined) because it always
ends up at y=0.

	I've currently got icon.previousSibling.attributes.y +
icon.previousSibling.attributes.h as the y property, but that makes the
text disappear completely (perhaps it's off the stage?). Do I just have
the wrong property, or is this because the properties of the
previousSibling are unknown when the next icon is encountered?


	 Paul Swanson 
	 Instructional Designer 
	 Harland Financial Solutions 
	 800.274.7280 Ext. 2462 
	 Paul.Swanson at harlandfs.com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20081119/a27f54f3/attachment.html

More information about the Xerte mailing list