Hi Wayne, On Mon, Feb 22, 2010 at 5:48 PM, wayne speir <wsp...@gmail.com> wrote: > Mathieu, > > What is it doing or not doing? > > -- Wayne
Thanks for the prompt reply. Sorry I was not clear. Rowspan and colspan do not seem to be taken into consideration at all. I have attached a screenshot of the plasmoid resulting from the code here. Mathieu [Moderators: sorry, I compressed the screenshots some more] > > On Mon, Feb 22, 2010 at 12:58 PM, Mathieu Ducharme > <ducharme.math...@gmail.com> wrote: >> >> Hi. >> >> I am not sure if this is my script, a documentation issue or a bug in >> the js-code itself. Anyway, here's hoping it makes sense... >> >> I am trying to set up a "complex" layout for a plasmoid, using >> GridLayout[1]. >> >> According to [2] it should be possible to specify the rowspan and >> colspan as parameters to the addItem method: >> gridLayout.addItem(item, row, col, rowspan, colspan); >> >> See attached testcase for an exemple. (plasmate == quick testcase deploy!) >> >> === >> mainLayout = new GridLayout(plasmoid); >> >> label1 = new Label(); >> label1.text = 'Row 1, Col 1'; >> mainLayout.addItem(label1, 0, 0); >> >> label2 = new Label(); >> label2.text = 'Row 1, Col 2'; >> mainLayout.addItem(label2, 0, 1); >> >> label3 = new Label(); >> label3.text = "Row1, Col 3. \nThis \ncell \nshould \nspan \nacross \n3 >> \nrows - \nRow1, Col 3. \nThis \ncell \nshould \nspan \nacross \n3 >> \nrows - \nRow1, Col 3. \nThis \ncell \nshould \nspan \nacross \n3 >> \nrows"; >> mainLayout.addItem(label3, 0, 2, 1, 3, 0); >> >> label4 = new Label(); >> label4.text = "Row 2, Col1. This cell should span across 2 columns - >> Row 2, Col1. This cell should span across 2 columns - Row 2, Col1. >> This cell should span across 2 columns"; >> mainLayout.addItem(label4, 1, 0, 2, 0, 0) >> >> label5 = new Label(); >> label5.text = "Row 3, Col 1"; >> mainLayout.addItem(label5, 2, 0); >> >> label6 = new Label(); >> label6.text = "Row 3, Col 2"; >> mainLayout.addItem(label6, 2, 1); >> == >> >> PS. Is there a more comprehensive Javascript API documentation than [3]? >> >> Mathieu >> >> -- >> [1] If GridLayout fails, how would one embed various layouts to create >> equivalent layout? >> [2] http://qt.nokia.com/doc/4.6-snapshot/qgraphicsgridlayout.html >> [3] http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API >> >> _______________________________________________ >> Plasma-devel mailing list >> Plasma-devel@kde.org >> https://mail.kde.org/mailman/listinfo/plasma-devel >> > > > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel > >
<<attachment: gridlayout.jpg>>
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel