Thread: addControl(obj)
View Single Post
  #1  
Old 02-04-2007, 07:34 AM
Twizt3d Twizt3d is offline
Registered User
Join Date: Jul 2003
Posts: 15
Twizt3d is on a distinguished road
addControl(obj)

This command doesnt seem to be working... =\ heres an example that doesnt work for me. It's Briefed up a bit

PHP Code:
new GuiWindowCtrl("QMenu") {
    for (
temp.0temp.thiso.bags.size(); temp.i++){
      new 
GuiBitmapCtrl("Bag_"@thiso.bags[temp.i]){
        new 
GuiBitmapCtrl("BagIcon_"@thiso.bags[temp.i]) {
    
    
        }
      }
    }

    
    new 
GuiScrollCtrl("ItemsListScroll") {
    }
  }
  
GraalControl.addcontrol(QMenu);
}

//Seperate function
 
with (ItemsListScroll){
    for (
temp.0temp.makevar("thiso."@type).size(); temp.i++){
      new 
GuiBitmapCtrl("Q_Slot_"@temp.i) {
    
        new 
GuiShowImgCtrl("Q_Slot_Icon_"@temp.i) {
         
          
thiso.catchevent(name,"onMouseDown","onInvenDown")
            
          
        }
      }
    }
  }
}

//This is where the problem comes in:

function onInvenDown(obj){
   
GraalControl.addcontrol(obj);
}

//I have tried every different kind of combination. It still stays in the the parent it is in. I even tried: 
//with (QMenu) GraalControl.addControl(ItemsListScroll);
//It wont add it to GraalControl. It is like stuck in there =( 
Reply With Quote