What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Listview issues

Listview issues
Author: Message:
Mothuim
New Member
*


Posts: 14
Joined: Jul 2006
O.P. Listview issues
I'm trying to add a listview control to my script. I can get it to fill in the first column perfectly but nothing else. i found this thread which seemed to be the same problem as mine. But i'd like to know why my method does not work. Specifically what the columnidx should be.

Here's my code:

code:
for (i = 1; i < NodeCol.length; i++)
   {xSMC = NodeCol.item(i).text
   xEmail = NodeCol.item(i).getAttribute("Contact")
//Create item
     OptionsWnd.LstView_AddItem(
    "ListViewMC",
    xEmail,
    i,
    i
);

//Set item texts
OptionsWnd.LstView_SetItemText(
    "ListViewMC",
    i,
    columnidx,
    xSMC
);
     
     
     }


I've tried a few obvious ideas like 0, 1 , 2 etc but nothing....

EDIT: I've also tried playing with the columnid value which is set in the interface xml but that didn't work either.

This post was edited on 07-21-2006 at 02:02 AM by Mothuim.
07-21-2006 01:59 AM
Profile E-Mail PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: Listview issues
Columnidx should be either 0 (first column), 1 (2nd column), 2, 3 etc.

Your ListView control in your XML file should also follow a similar format;
code:
<Control xsi:type="ListViewControl" Id="lstContacts">
    <Position Top="20" Width="326" Left="12" Height="162"></Position>
    <Attributes>
        <AlwaysShowSelection>false</AlwaysShowSelection>
    </Attributes>
   
    <ReportView>
        <SortColHeader>true</SortColHeader>
        <HasCheckboxes>true</HasCheckboxes>
    </ReportView>
    <Columns>
        <Column>
            <ColumnId>colEmail</ColumnId>
            <Label>Email</Label>
            <Width>30</Width>
        </Column>
        <Column>
            <ColumnId>colName</ColumnId>
            <Label>Nickname</Label>
            <Width>71</Width>
        </Column>
       
    </Columns>
   
</Control>

In this example colEmail would be the first column (ie. columnidx = 0) and colName would be the 2nd column (ie. columnidx = 1)
07-21-2006 07:57 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On