<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Positioning icons relative to the previous icon.</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-GB link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>To do the table I would do this:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Add a script, call it setup:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>colWidth = 120;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>rowHeight = 40;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>xStart = 20;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>yStart = 20;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Add a decision icon, with a page for each column; each page has
the same number of textIcons in it;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Set the decision icon to erase = 0; eraseOnExit = 0; id = cols<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>For the text icons:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Set x to xStart + icon.parentNode.index() * colWidth<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Set y to yStart + icon.index() * rowHeight<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Set w to colWidth;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Then draw the table afterward the decision with this script:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>colCount = cols.pages.length;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>rowCount = cols.pages[0].children.length;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>cols.lineStyle(1,0x000000,100);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>cols.beginFill(0xFFFFFF,100);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>for (i = 0; i &lt;= colCount; i++){<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp; cols.moveTo(xStart + i*colWidth, yStart);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp; cols.lineTo(xStart + i*colWidth, yStart + rowCount *
rowHeight);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>for (i = 0; i &lt;= rowCount; i++){<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp; cols.moveTo(xStart, yStart + i * rowHeight);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp; cols.lineTo(xStart + colCount * colWidth, yStart + i *
rowHeight);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Then you can just play around with the code to do exactly what
you need.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>J<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
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 11:38 PM<br>
<b>To:</b> Xerte discussion list<br>
<b>Subject:</b> RE: [Xerte] Positioning icons relative to the previous icon.<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>I guess I still have to fiddle a
bit with the + amount, because I have&nbsp;to set the h parameter for the
drawBorder to work, and it doesn't precisely match the gutter height. But it's
only ever&nbsp;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?</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Still way easier than how I was
doing it!</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>P</span><o:p></o:p></p>

<blockquote style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
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.</span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>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.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>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.</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Geez, don't you guys ever sleep?
It must be 11pm in the UK! Thanks for the speedy response!</span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:blue'>Paul</span><o:p></o:p></p>

<blockquote style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
lang=EN-US>

<hr size=2 width="100%" align=center>

</span></div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
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.</span><span
lang=EN-US><o:p></o:p></span></p>

<div id=idOWAReplyText33785>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif";color:black'>try _ytile</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'>It gives you the value of
icon.previousSibling.clip()._y + icon.previousSibling.clip()._height. I usually
put _ytile + 10 in the y property.</span><o:p></o:p></p>

</div>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'>

<hr size=2 width="100%" align=center>

</div>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
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.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><o:p>&nbsp;</o:p></p>

<p style='margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>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.</span><o:p></o:p></p>

<p style='margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>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?</span><o:p></o:p></p>

<p style='margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Courier New";
color:gray'>_____________________________</span> <o:p></o:p></p>

<p style='margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Courier New";
color:gray'>&nbsp;Paul Swanson</span> <br>
<span style='font-size:10.0pt;font-family:"Courier New";color:gray'>&nbsp;Instructional
Designer</span> <br>
<span style='font-size:10.0pt;font-family:"Courier New";color:gray'>&nbsp;Harland
Financial Solutions</span> <br>
<span style='font-size:10.0pt;font-family:"Courier New";color:gray'>&nbsp;800.274.7280
Ext. 2462</span> <br>
<span style='font-size:10.0pt;font-family:"Courier New";color:gray'>&nbsp;Paul.Swanson@harlandfs.com</span>
<br>
<span style='font-size:10.0pt;font-family:"Courier New";color:gray'>_____________________________</span>
<o:p></o:p></p>

</div>

</blockquote>

</blockquote>

</div>

</body>

</html>