View Single Post
  #3  
Old 02-15-2006, 07:23 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
thanks, I have made good progress, but on the Tree controll, when I click on a node, I want it to change the text in a scrolling text box. select() appears to be the only likely command to detect if a node in the tree is clicked, there is really not enough information on the Tree control to tell me what i need to know to make it work.

Within the window:
PHP Code:

// the option list
  
new GuiScrollCtrl("item_scroll")
    {
    
width=150;
    
height=300;

   new 
GuiTreeViewCtrl("item_list")
     {
      
width=150;
      
height=400;
      
columns="0 16";
      
visible=true;  
      
addnode("test1");   
      
addnode("test2");   
      
addnode("test3");   
     }
  }

// scrolling text window
  
new GuiScrollCtrl("item_desc_scroll")
    {
    
width=150;
    
height=150;
    
    new 
GuiMLTextCtrl("item_desc_text")
      {
        
wordwrap=true;
        
text="hi there i am some text";
      }
    }

/* so this is what i tried to detect the action of the node being clicked with the mouse to change the text box to something else. But it dosent work. What is the propper detection for that action?*/

function onitem_list.select()
{
  
item_desc_text.text="you clicked a node";

thanks again for the support
Reply With Quote