Shoutbox

ListViewControl - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: ListViewControl (/showthread.php?tid=62474)

ListViewControl by TheMaskedFace on 07-03-2006 at 11:59 PM

I have a listviewcontrol in my XML file for PLUS LIVE script.Like that;
<Control xsi:type="ListViewControl" Id="LstContacts">
and also I have some columns.
In my js file I want to fill this listview with some datas. I can just fill the first column but not second or other ones...
I use this functions for that;
plusWnd.LstView_AddItem("LstContacts",contact.Name,c);

How can I obtain ListView like a table which is filled within all columns?


RE: ListViewControl by -dt- on 07-04-2006 at 03:16 AM


heres the function i use in Rssreader to do it

code:
/*
* ---------------------------
* Void ListViewAddRow (PlusWindow wnd , String id, Array row )
* adds a row to a listView
* ----------------------------
*/
function ListViewAddRow(window,id,row){
    var pos = window.LstView_AddItem(id,row[0]);
    for(var i=1;i<row.length;i++){
        window.LstView_SetItemText(id,pos,i,row[i]);
    }
}



use it like

code:
ListViewAddRow(PlusWnd, "xxx", Array('first column','second column','third column'));


RE: ListViewControl by TheMaskedFace on 07-04-2006 at 10:21 AM

Thanks a lot...this is awesome