From: Raymond I. <xw...@ya...> - 2003-10-07 01:50:27
|
why not use the setAutoSize() function? var pb = new PanelBar() pb.setWidth(200) pb.setAutoSize(null,true); // ^ now the panelbar should adjust // to the height of it's content -- Raymond Irving --- Andrew Gillett <an...@zo...> wrote: > Hi Daniel, > > Daniel Tiru wrote: > > Hi Andrew! > > > > I have looked throught your code and i will make > the changes to the > > stacker, and aswell the ";" to the window :) > > > > However i dont really understand the change you > did to the window. Do > > you want the content layer to set the size of the > window? > > Exactly. Currently the height of the window is > fixed to the number of pixels you specify when you > create it. I want to create a PanelBar, set its > content to an arbitrary amount of text, and have the > window automatically size itself to fit the text. > > My main issue with PanelBar as it stands is that it > does not allow subclassing because its constructor > fails when invoked with no arguments. > > I've attached an example of what I wanted, along > with a slightly modified version of panelbar.js. I > hope you'll be able to see what I'm talking about. > > > Or am i out of > > the game? > > No way :) > > > > > Regards > > Daniel > > > > regards, > Andrew > > > ATTACHMENT part 2 application/x-zip-compressed name=expaningpanelbar.zip __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |