Mathieu,<br><br>What is it doing or not doing?<br><br>-- Wayne<br><br><div class="gmail_quote">On Mon, Feb 22, 2010 at 12:58 PM, Mathieu Ducharme <span dir="ltr">&lt;<a href="mailto:ducharme.mathieu@gmail.com">ducharme.mathieu@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi.<br>
<br>
I am not sure if this is my script, a documentation issue or a bug in<br>
the js-code itself. Anyway, here&#39;s hoping it makes sense...<br>
<br>
I am trying to set up a &quot;complex&quot; layout for a plasmoid, using GridLayout[1].<br>
<br>
According to [2] it should be possible to specify the rowspan and<br>
colspan as parameters to the addItem method:<br>
gridLayout.addItem(item, row, col, rowspan, colspan);<br>
<br>
See attached testcase for an exemple. (plasmate == quick testcase deploy!)<br>
<br>
===<br>
mainLayout = new GridLayout(plasmoid);<br>
<br>
label1 = new Label();<br>
label1.text = &#39;Row 1, Col 1&#39;;<br>
mainLayout.addItem(label1, 0, 0);<br>
<br>
label2 = new Label();<br>
label2.text = &#39;Row 1, Col 2&#39;;<br>
mainLayout.addItem(label2, 0, 1);<br>
<br>
label3 = new Label();<br>
label3.text = &quot;Row1, Col 3. \nThis \ncell \nshould \nspan \nacross \n3<br>
\nrows - \nRow1, Col 3. \nThis \ncell \nshould \nspan \nacross \n3<br>
\nrows - \nRow1, Col 3. \nThis \ncell \nshould \nspan \nacross \n3<br>
\nrows&quot;;<br>
mainLayout.addItem(label3, 0, 2, 1, 3, 0);<br>
<br>
label4 = new Label();<br>
label4.text = &quot;Row 2, Col1. This cell should span across 2 columns -<br>
Row 2, Col1. This cell should span across 2 columns - Row 2, Col1.<br>
This cell should span across 2 columns&quot;;<br>
mainLayout.addItem(label4, 1, 0, 2, 0, 0)<br>
<br>
label5 = new Label();<br>
label5.text = &quot;Row 3, Col 1&quot;;<br>
mainLayout.addItem(label5, 2, 0);<br>
<br>
label6 = new Label();<br>
label6.text = &quot;Row 3, Col 2&quot;;<br>
mainLayout.addItem(label6, 2, 1);<br>
==<br>
<br>
PS. Is there a more comprehensive Javascript API documentation than [3]?<br>
<br>
Mathieu<br>
<font color="#888888"><br>
--<br>
[1] If GridLayout fails, how would one embed various layouts to create<br>
equivalent layout?<br>
[2] <a href="http://qt.nokia.com/doc/4.6-snapshot/qgraphicsgridlayout.html" target="_blank">http://qt.nokia.com/doc/4.6-snapshot/qgraphicsgridlayout.html</a><br>
[3] <a href="http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API" target="_blank">http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API</a><br>
</font><br>_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
<br></blockquote></div><br>