RE: General Help with Interfaces
Hmm.
First, to create your window:
var Wnd = MsgPlus.CreateWnd('XMLFile.xml','WindowIdentifier');
This creates your window, and it can be accessed through Wnd, as declared.
I also recommend you have your window initialization code in a seperate function for flexibility.
And to add items to a ListView, use this.
Wnd.LstView_AddItem("ListView","MainText",Data[Number],Position[Number]);
Note: Parameters Data and Position are optional!
Okay, so say you wanted to add three items, you could do this in two ways.
Way one:
var Wnd = MsgPlus.CreateWnd('XMLFile.xml','WindowIdentifier'); //Initialize Window!
Wnd.LstView_AddItem("ListView","Item 1",0); //Add Item 1
Wnd.LstView_AddItem("ListView","Item 2",1); //Add Item 2
Wnd.LstView_AddItem("ListView","Item 3",2); //Add Item 3
// And repeat for each item. 0, 1, 2 .etc are the data for each element
Way two:
var Wnd = MsgPlus.CreateWnd('XMLFile.xml','WindowIdentifier'); //Initialize Window!
var items = new Array('ItemOne','ItemTwo','ItemThree','ItemFour','ItemFive');
for (i=0; i<=items.length; i++)
{
Wnd.LstView_AddItem("ListView",items[i],2); //Add Item based on array
}
Hopefully that helped! If you have any other problems ask me.
Although I don't think I answered your question correctly, did I?
Attachment: ListViewTest.plsc (1.39 KB)
This file has been downloaded 290 time(s).
This post was edited on 11-30-2007 at 07:32 PM by Toneo.
|