Problem with tabbedpanel

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
sark
Posts: 1
Joined: December 13th, 2009, 10:05 am

Hi!

I'm trying to work with tabbed panel. After some time workin on it I don't know why it works while I don't define bounds for my window. When I define the bounds, nothing appears in the window...

It's normal? I don't really understand why that happens...

Code: Select all

var w = new Window("dialog", "Title");

w.bounds = [100,100,500,500];

w.tp=w.add("tabbedpanel");

w.tp.t1 = w.tp.add("tab",[25,25,375,375], 'Joe');
w.tp.t1.alignChildren="left";
//w.tp.t1.preferredSize=[390,390];
w.tp.t1.e = w.tp.t1.add("edittext", [15,10,105,30],"Text");

w.tp.t2 = w.tp.add("tab",[25,25,375,375], 'Joe2');
w.tp.t2.alignChildren="left";
//w.tp.t2.preferredSize=[390,390];
w.tp.t2.e = w.tp.t2.add("edittext", [0,0,105,30],"Text2");

w.show();
Thanks!
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

This seems to work ok. You were defining bounds in the tab elements, not the tabbedpanel.

According to the CS4 scripting guide, bounds "does not apply to containers of type tab, whose bounds are determined by the parent tabbedpanel container."

Code: Select all

var w = new Window("dialog", "Title");
w.bounds = [100,100,500,500];

w.tp=w.add("tabbedpanel",[25,25,375,375],);

w.tp.t1 = w.tp.add("tab",undefined, 'Joe');
w.tp.t1.alignChildren="left";
//w.tp.t1.preferredSize=[390,390];
w.tp.t1.e = w.tp.t1.add("edittext", [15,10,105,30],"Text");

w.tp.t2 = w.tp.add("tab",undefined, 'Joe2');
w.tp.t2.alignChildren="left";
//w.tp.t2.preferredSize=[390,390];
w.tp.t2.e = w.tp.t2.add("edittext", [0,0,105,30],"Text2");

w.show();
Post Reply