Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Controls (https://forums.graalonline.com/forums/showthread.php?t=76108)

killerogue 08-04-2007 10:35 PM

Controls
 
PHP Code:

temp.ainfo System.serverFunction(this.name"getAbilities"player.account);
      
temp.1;
      
with (Mal_Main) {
        new 
GuiScrollCtrl(Mal_Ability_Scroll) {
          
position = {3244};
          
extent = {143225};
          
image null;
          
//red = green = blue = alpha = 0;
          
hScrollBar vScrollBar "alwaysOff";
          new 
GuiTextListCtrl(Mal_Abilities_Scroll) {
            
0;
            
width 200;
            
fitparentwidth true;

            
clearrows();
            for (
temp.ainfo) {
              echo(
a);
              
addrow(temp.ia[0]);
              
temp.i++;
            }
            
setSelectedRow(1);
          }
        }
      } 

This is pretty weird. So far, when I have two problems. When I put the text list ctrl inside the scroll control, the text lister isn't shown. But when I put it outside of the scroll ctrl and take away the scroll altogether I can't make make the text list as long as I need to.

zokemon 08-05-2007 01:03 AM

What objecttype() is Mal_Main?
I experienced once (it was back in v4 though) where the width of a textlist and treeview would be set to 8 regardless of any width I had set or if fitparentwidth was on or off. This would only happen when I had the scroll control in a certain type of GUI but I don't remember which one, sorry :(

killerogue 08-05-2007 05:12 AM

Mal_Main is a Regular GuiControl.

DustyPorViva 08-05-2007 05:33 AM

Have you tried putting the for outside of the control?

PHP Code:

for (temp.ainfo) {
  echo(
a);
  
Mal_Abilities_Scroll.addrow(temp.ia[0]);
  
temp.i++;



killerogue 08-05-2007 05:45 AM

Didn't make any difference. We ARE talking about the text list control width tho dusty :p

DustyPorViva 08-05-2007 06:01 AM

Ah, no idea what really was the problem :x

zokemon 08-05-2007 06:37 AM

Hmm. When I had this problem, addrow() refused to work for me also just so you know.

Trying changing the GuiTextListCtrl to GuiTreeViewCtrl and change the addrow's to addnode's
(Just so you can see if it works. Infact, you can even use a treeviewctrl as a textlist if you have to.. Just remove the first line and don't add any child nodes to any root node. Then it should look identical (but this is only incase GuiTextListCtrl just refuses to work)

Also try changing it to a simple control like a GuiBitmapCtrl and set the image just so you know that controls are being placed in the container and actually take up your specified size.

killerogue 08-05-2007 06:57 AM

I know it's working when I use it outside of the Scroll ctrl. I just can't get it to the right size. But when I put the text list inside the scroll it refuses to show or work.

Thanks Zero, I may have to end up using a tree view ctrl. :P But thanks for your help. <3

xXziroXx 08-05-2007 12:37 PM

Stan, check my posts in this thread:

http://forums.graalonline.com/forums...t=75724&page=2

The problem lies in the GuiScroll profile, I have yet to test my way to which var is causing it.


All times are GMT +2. The time now is 10:53 AM.

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