<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
dir=ltr><HEAD><TITLE>Positioning icons relative to the previous icon.</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16735" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=253513223-19112008><FONT face=Verdana
color=#0000ff size=2>I guess I still have to fiddle a bit with the + amount,
because I have to set the h parameter for the drawBorder to work, and it
doesn't precisely match the gutter height. But it's only ever a couple of
pixels off. It varies whenever the text wraps to multiple lines. Is there a way
to calculate the height based on the textSize for a particular
font?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=253513223-19112008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=253513223-19112008><FONT face=Verdana
color=#0000ff size=2>Still way easier than how I was doing
it!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=253513223-19112008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=253513223-19112008><FONT face=Verdana
color=#0000ff size=2>P</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Paul
Swanson<BR><B>Sent:</B> Wednesday, November 19, 2008 3:02 PM<BR><B>To:</B>
Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Positioning icons
relative to the previous icon.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2>Geez, don't you guys ever sleep? It must be 11pm in the
UK! Thanks for the speedy response!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=291075522-19112008><FONT face=Verdana
color=#0000ff size=2>Paul</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <B>On Behalf Of </B>Julian
Tenney<BR><B>Sent:</B> Wednesday, November 19, 2008 2:08 PM<BR><B>To:</B>
Xerte discussion list<BR><B>Subject:</B> RE: [Xerte] Positioning icons
relative to the previous icon.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText33785 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>try _ytile</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>It gives you the value of
icon.previousSibling.clip()._y + icon.previousSibling.clip()._height. I
usually put _ytile + 10 in the y property.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> xerte-bounces@lists.nottingham.ac.uk
on behalf of Paul Swanson<BR><B>Sent:</B> Wed 19/11/2008 21:59<BR><B>To:</B>
Xerte discussion list<BR><B>Subject:</B> [Xerte] Positioning icons relative
to the previous icon.<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT face=Verdana size=2>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.</FONT></P>
<P><FONT face=Verdana size=2>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?</FONT></P>
<P><FONT face="Courier New" color=#808080
size=2>_____________________________</FONT> </P>
<P><FONT face="Courier New" color=#808080 size=2> Paul Swanson</FONT>
<BR><FONT face="Courier New" color=#808080 size=2> Instructional
Designer</FONT> <BR><FONT face="Courier New" color=#808080
size=2> Harland Financial Solutions</FONT> <BR><FONT face="Courier New"
color=#808080 size=2> 800.274.7280 Ext. 2462</FONT> <BR><FONT
face="Courier New" color=#808080
size=2> Paul.Swanson@harlandfs.com</FONT> <BR><FONT face="Courier New"
color=#808080 size=2>_____________________________</FONT>
</P></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>