What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Tree-view controls and item images

[?] Tree-view controls and item images
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [?] Tree-view controls and item images
Well, first of all you'll need to put some images in the tree view's image list. In order to prevent Plus! from messing up the image indexes, I always prefix the image ID with the image position.
xml code:
<Control xsi:type="TreeViewControl" Id="MyTree">
    <Position Left="10" Top="10" Width="100" Height="150" />
    <Images>
        <NormalIcons>
            <Image Id="01-folder">
                <Name>icon-folder</Name>
            </Image>
            <Image Id="02-file">
                <Name>icon-file</Name>
            </Image>
        </NormalIcons>
    </Images>
</Control>
Now to add an item, you can use TreeView::addItem.
js code:
var tree = new TreeView(PlusWnd, "MyTree");
var parentNode = tree.addItem("My folder", 0, 0);
var childNode = tree.addItem("My file", parentNode, 1);
This will add a root node with a child node to the tree. The root node will have a folder icon and the child node will have a file icon (assuming that you have those images in your script).
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
04-29-2010 06:12 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Tree-view controls and item images - by SmokingCookie on 04-29-2010 at 02:53 PM
RE: [?] Tree-view controls and item images - by Matti on 04-29-2010 at 05:25 PM
RE: [?] Tree-view controls and item images - by SmokingCookie on 04-29-2010 at 05:29 PM
RE: [?] Tree-view controls and item images - by matty on 04-29-2010 at 05:33 PM
RE: [?] Tree-view controls and item images - by SmokingCookie on 04-29-2010 at 05:35 PM
RE: [?] Tree-view controls and item images - by matty on 04-29-2010 at 05:36 PM
RE: [?] Tree-view controls and item images - by SmokingCookie on 04-29-2010 at 05:40 PM
RE: [?] Tree-view controls and item images - by Matti on 04-29-2010 at 05:50 PM
RE: [?] Tree-view controls and item images - by SmokingCookie on 04-29-2010 at 05:52 PM
RE: [?] Tree-view controls and item images - by Matti on 04-29-2010 at 06:12 PM
RE: [?] Tree-view controls and item images - by SmokingCookie on 04-29-2010 at 06:50 PM


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