![]() |
Few questions w/ GuiTreeViewCtrl
1) How can I change the image selection?
2) How can I check which is the last node of a group? ( To give it a specific image ) Basically it opens a text file, and sends to client then loads it up into a treeview (works).. just can't get the two things I listed above to work =( |
You can either use icons (setIconSize() etc.), and you update them when you click the node or the node is expanded,
or you use the profile.bitmap, which can contain any number of sub images, separated by the color of the first pixel in the image (upper-left corner), check treeview_serverlisticons.png. The node then automatically chooses one of the images based on node.image, node.selectedimage, node.expandedimage and node.expandedselectedimage which specify the number of the image that should be used. |
Quote:
PHP Code:
In Members: 1=KuJi (which is basically rank ids in the tree view or whatever) In Ranks: 1=General Armii 1.1=General-Polkovnik 1.2=General-Lieutenant 1.3=General-Major That would add me under General Armii which is fine. I just dont know how I can check the full length and use getnodebypath("STR", "STR"); or whatever =(. If you have an idea to end up searching 5.4.4.8.2.6.8.3 (infinite really.. depends on how many ranks) to get the full paths.. please post it. |
Bump =o
|
bump :O
I'm starting to learn this TreeView stuff too and I gotta know: How do I add lists of things? addnode("Name of item here")? am I supposed to add them by root? It would be great if the wiki example could be the input for the intro pic on the top of the page... ( http://wiki.graal.net/index.php/Crea...uiTreeViewCtrl ) |
addnode() or addnodebypath() like in the example
|
Alright, and how would one be able to include a custom image alongside a node? HTML?
|
alongside? You mean beside setting an unique icon?
|
Forget that question please. While I was unable to login to the g2k1 forums I eventually solved that matter.
New question: How to use onSelect(qch, qch, qch)? function GUIname.onSelect(?,?,?) {} can someone give me a practical example for what to use in the function's arguments? I'm having trouble figuring out whether I should put a variable for the node's name, make a for loop and put the node's name in the 1st argument position and leave the others null, or what... edit - can I say function GUI_Name.onSelect(getselectednode(),null,null) {} to make this work or should I use a variable and assign it to getselectednode()? edit again - would I need to use the TreeViewCtrl name or the ScrollCtrl name? ((If I am way off then don't bother elaborating on why I'm wrong and just tell me the answer and call me stupid or something -ooc)) |
| All times are GMT +2. The time now is 09:54 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.