Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-20-2011, 04:48 AM
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
Changing the parent of a GuiTextListCtrl causes it to lose all its rows

When you add a GuiTextListCtrl inside a GuiScrollCtrl, then change the text list's parent using otherScroll.addParent, the text list no longer has any rows in it.

This is happening on the latest v6.

The following code can be used to replicate the problem:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  if (
Test_Window != null) {
    
Test_Window.destroy();
  }
  
  
// draw a window with two scrolls, one of which has a list in it
  
new GuiWindowCtrl("Test_Window") {
    
profile GuiBlueWindowProfile;
    
    
clientWidth 200;
    
clientHeight 200;
    
    
clientRelative true;
    
    new 
GuiScrollCtrl("Test_ScrollOld") {
      
profile GuiBlueScrollProfile;
      
      
width Test_Window.clientWidth;
      
height = (Test_Window.clientHeight 2) - 5;
      
      new 
GuiTextListCtrl("Test_List") {
        
profile GuiBlueTextListProfile;
        
        for (
temp.0temp.10temp.++) {
          
this.addRow(0"Row " temp.i);
        }
      }
    }
    
    new 
GuiScrollCtrl("Test_ScrollNew") {
      
profile GuiBlueScrollProfile;
      
      
width Test_Window.clientWidth;
      
height = (Test_Window.clientHeight 2);
      
      
Test_ScrollOld.height 5;
    }
  }
  
  
// now, move Test_List from Test_ScrollOld to Test_ScrollNew
  
echo("rows before: " Test_List.rows.size());
  
Test_ScrollNew.addControl(Test_List);
  echo(
"rows after: " Test_List.rows.size());

In F2, the output is:
Quote:
Originally Posted by F2
rows before: 10
rows after: 0
The expected output is:
Quote:
Originally Posted by F2
rows before: 10
rows after: 10
__________________
Reply With Quote
 


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 08:34 PM.


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