Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-11-2007, 05:20 PM
doomboy00 doomboy00 is offline
Registered User
doomboy00's Avatar
Join Date: Jan 2004
Posts: 45
doomboy00 is on a distinguished road
Dynamic Framesets?

I've recently been playing around with gui's and came across something that no matter how much trial and error i attempt i cannot get this to work.

Basically it's a gui with a dynamic number of tabs depending on a string being set. With a pane for each of these tabs, but for the life of me I cannot get the pane to show.

Any help would be greatly appreciated:

NPC Code:

function onSetup()
{
new GuiWindowCtrl("testWindow")
{
profile = "GuiBlueWindowProfile";
useownprofile = true;
extent = "400 600";
position = "30 30";
text = "testWindow";
destroyonhide = false;
canmaximize = false;
canresize = false;

new GuiTextCtrl("testTitle")
{
profile = "GuiBlueTextProfile";
useownprofile = true;
position = "120 25";
profile.fontsize = 20;
profile.fontcolor = {255,255,255};
profile.fontType = "Verdana";
text = "Dynamic Tabbing";
}

frameInd=1;
while(clientr.("imgstore"@frameInd))
{
new GuiFrameSetCtrl("mainFrame"@frameInd)
{
position = "20 80";
extent = "350 400";
rowcount = 5;
columncount = 4;
visible=false;
bordermovable="alwaysOff";
totalcount = rowcount*columncount;

for(imgInd=0;imgInd<totalcount;imgInd++)
{
new GuiControl("imgBox"@imgInd)
{
profile = "GuiBlueScrollProfile";
useownprofile = true;
hscrollbar = "dynamic";
vscrollbar = "dynamic";

new GuiShowImgCtrl("img"@imgInd)
{
position = "15 10";
extent = "48 48";
image = clientr.("imgstore"@frameInd)[imgInd]@".png";
offsetx = "-96";
thiso.catchevent(name,"onMouseDown","onImgSelect") ;
}
}
}
frameInd++;
}
}

new GuiTabCtrl("testTab")
{
profile = "GuiBlueTabProfile";
useownprofile = true;
position = "20 60";
extent = "380 20";
tabwidth = "70";

clearrows();
tabInd=1;
while(clientr.("imgstore"@tabInd))
{
with(addrow(tabInd-1,"Set " @tabInd))
{
this.pane="mainFrame"@tabInd;
}
tabInd++;
}

thiso.catchevent(name, "onSelect", "onTabSelect");
}
}
testTab.setSelectedById(0);
graalControl.addControl(testWindow);
}

function onTabSelect(tabs)
{
tabs.selected.pane.show();
}

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 02:53 PM.


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