Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-06-2011, 11:19 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Tree View

OK, well on my "mission" to get to grips with remembering GS2 functions and understanding how everything works, I am trying my very best at using each and every command to get used to using them. I find that creating scripts using the things I am studying help me to understand the controls better. For instance...
NPC Code:
Online Log Reader - Reading and writing from.txt files
Chat System - Using triggerserver and triggerclient
Item Spawner - Using putnpc2(); and using classes


I now want to be able to get to grips with using a tree view control in my scripts. I don't actually know how I would go about using this but if anybody has any ideas or wants to explain to me in depth what a tree view control actually does I will be very happy with that! ^_^

Here is what I know already.

Tree views can be created and added too by using both parents and and children. The parent control is the "top of the tree" and the children grow down the tree. It can be used to store multiple bursts of short information and picking options from each of the nodes.
__________________
Reply With Quote
  #2  
Old 09-06-2011, 12:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
It's just a tree list.

Example from SQL Explorer:

PHP Code:
new GuiTreeViewCtrl("SQL_Data_DBs_Tree") {
  
profile GuiBlueTreeViewProfile;

  
0;
  
0;

  
fitparentwidth true;
  
horizSizing "width";

  
active false;

  
clearNodes();
  
addNode("Loading...");

later..

PHP Code:
with (SQL_Data_DBs_Tree) {
  
clearNodes();
  
active true;

  for (
temp.dbdata[0]) {
    
with (addNode(db[0])) {
      
this.expanded false;
      
      for (
temp.tabledb[1]) {
        
this.expanded false;

        
with (addNode(table[0])) {
          
this.database db[0];

          for (
temp.idxtable[1]) {
            
with (addNode(idx[0] @ " (" idx[1] @ ")")) {
              
image selectedimage 2;

              
this.indexName idx[0];
              
this.columns idx[1];
            }
          }
        }
      }
    }
  }
// lol 
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.