Hi all there, thanks for your help.
Indeed, the percentWidth is what i was looking for, thanks a lot!
However, still I have this problem.
I have an HBox with two panels, side by side. My mainPanel and my helpPanel.
I have a 'hide helpPanel button' which does the obvious. This is my
actionscript behind this:
public function showHideHelp():void {
if (helpPanel.visible == true) {
mainPanel.percentWidth = 100;
helpPanel.visible = false;
} else {
mainPanel.percentWidth = 85;
helpPanel.visible = true;
}
For some reason, this does not works :-( My mainPanel does not resize to
100% as one would expect. Instead, it resizes just a bit more from it's
initial width (that is 85% and 15%).
Am I doing something wrong here?
thanks again,
George
On 10/28/07, Bailey <[EMAIL PROTECTED]> wrote:
>
> Hi George,
> yeah the width property will only take an integer so you must use the
> percentProperty to set a percent.
> So something like this would be fine~
>
> public function changeWidth():void
> {
> mainPanel.percentWidth = 100;
> }
>
>
>
> On 10/28/07, George Georgiou <[EMAIL PROTECTED] > wrote:
> >
> > Hi there,
> >
> > This is a very simple but I can't get it work. I have a panel and I want
> > to change it's with to 100% by means of ActionScript. Here's what I do:
> >
> > public function changeWidth():void {
> > mainPanel.width = 100%;
> > }
> >
> > where mainPanel if of course the ID of my panel.
> >
> > I get an error like: semicolon is unexpected. I have tried using
> > mainPanel.width="100%"; but this does not work also because .width is of
> > type integer.
> >
> > Any ideas on how to achieve this?
> >
> > thanks,
> > George
> >
> >
> >
>
>