About Store Forum Documentation Contact
Donations:
289$/mo



Post Reply 
Create Dynamically tabs
Author Message
Dynad Offline
Member

Post: #1
Create Dynamically tabs
Hey,

Is there a way to create Dynamically tabs, now you can like the tutorial predefine them and create them.

But i want 1 tab and create on the run more tabs to the window.

You can use this but then i need to recreate the other windows as well.
window+=tabs .create(Rect_LU(0,0,1,0.08),0,tab,ELMS(tab)+1);


Thnx,
~Dynad

There is always evil somewhere, you just have to look for it properly.
08-24-2010 01:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Create Dynamically tabs
you shouldnt use
tab and ELMS(tab)+1, only ELMS(tab)

for your question:
window+=tabs .create(Rect_LU(0,0,1,0.08),0,NULL,tab_count); // set NULL
now iterate all tab in tabs and set its text manually
08-26-2010 12:40 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: Create Dynamically tabs
Ok thnx, btw is there a way to add/delete data from a list in the update?

You can use this *regionlist+= list .create(list_group,ELMS(list_group)).setData(data,ELMS(data));

But this is in the Init or does this work the same as the tabs?

There is always evil somewhere, you just have to look for it properly.
(This post was last modified: 08-26-2010 06:39 PM by Dynad.)
08-26-2010 06:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #4
RE: Create Dynamically tabs
Nevermind i got it working smile

There is always evil somewhere, you just have to look for it properly.
08-26-2010 08:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #5
RE: Create Dynamically tabs
Another question about the style, how does the colors of the tab buttons work?

PHP Code:
getWindow(CNULL)+=tabs.create(Rect_LU(0,0,getWindow(CNULL).crect.w(),0.08),0,tabs_t,ELMS(tabs_t)).valid(true).set(0);
    
pTabsStyle.back_color ColorHSB(45,56,94);
tabs.style = &pTabsStyle

This is not working, probably i am changing something else here...


Thnx,
~Dynad

There is always evil somewhere, you just have to look for it properly.
08-31-2010 12:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: Create Dynamically tabs
doesn't ColorHSB accept Flt parameters? then it means they should be in range 0..1
09-01-2010 12:12 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #7
RE: Create Dynamically tabs
Ah good point.. i will check this out smile

There is always evil somewhere, you just have to look for it properly.
09-01-2010 12:34 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #8
RE: Create Dynamically tabs
Well i tried this out but even with:
pTabsStyle.back_color = ColorHSB(0.167f,0.223f,0.369f);

It doesn't change the button backcolor :(

There is always evil somewhere, you just have to look for it properly.
09-03-2010 01:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #9
RE: Create Dynamically tabs
for button color you'd need to accesss tabs.tab(i).color
09-03-2010 08:27 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #10
RE: Create Dynamically tabs
Ah yes that works indeed, thnx smile

There is always evil somewhere, you just have to look for it properly.
09-04-2010 02:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply