Loading ...
Sorry, an error occurred while loading the content.

HBoxPane and percentWidth

Expand Messages
  • Jim Cook
    When a component is added to a subclass of HBoxPane and the container has been configured to layout its children using a percentWidth or percent Height
    Message 1 of 4 , Jan 31, 2009
    View Source
    • 0 Attachment
      When a component is added to a subclass of HBoxPane and the container
      has been configured to layout its children using a percentWidth or
      percent Height property, does the container stretch the components, or
      do these children get an opportunity to redraw themselves at their new
      height and width?
    • Josh Tynjala
      The width and height properties of the children are set. If a child is designed to redraw when that happens, then it should redraw normally. If its just a
      Message 2 of 4 , Feb 1, 2009
      View Source
      • 0 Attachment
        The width and height properties of the children are set. If a child is
        designed to redraw when that happens, then it should redraw normally.
        If its just a regular old Sprite or MovieClip, then it'll stretch.

        - Josh

        On Sat, Jan 31, 2009 at 7:12 PM, Jim Cook <yahoo@...> wrote:
        > When a component is added to a subclass of HBoxPane and the container
        > has been configured to layout its children using a percentWidth or
        > percent Height property, does the container stretch the components, or
        > do these children get an opportunity to redraw themselves at their new
        > height and width?
        >
        >
      • Jim Cook
        How should a child be designed to redraw? They extend Sprite and I have a listener on the Event.RESIZE, but that never gets called. Thanks
        Message 3 of 4 , Feb 1, 2009
        View Source
        • 0 Attachment
          How should a child be designed to redraw? They extend Sprite and I
          have a listener on the Event.RESIZE, but that never gets called.

          Thanks

          --- In ydn-flash@yahoogroups.com, Josh Tynjala <josh@...> wrote:
          >
          > The width and height properties of the children are set. If a child is
          > designed to redraw when that happens, then it should redraw normally.
          > If its just a regular old Sprite or MovieClip, then it'll stretch.
          >
          > - Josh
          >
          > On Sat, Jan 31, 2009 at 7:12 PM, Jim Cook <yahoo@...> wrote:
          > > When a component is added to a subclass of HBoxPane and the container
          > > has been configured to layout its children using a percentWidth or
          > > percent Height property, does the container stretch the components, or
          > > do these children get an opportunity to redraw themselves at their new
          > > height and width?
          > >
          > >
          >
        • tripp.bridges
          Hi, You may want to try overriding the setters for your class width and height properties. Something like this should do it: override public function set
          Message 4 of 4 , Feb 1, 2009
          View Source
          • 0 Attachment
            Hi,
            You may want to try overriding the setters for your class' width and
            height properties. Something like this should do it:

            override public function set width(value:Number):void
            {
            //call your redraw function
            }

            Thanks,
            Tripp
            --- In ydn-flash@yahoogroups.com, "Jim Cook" <yahoo@...> wrote:
            >
            > How should a child be designed to redraw? They extend Sprite and I
            > have a listener on the Event.RESIZE, but that never gets called.
            >
            > Thanks
            >
            > --- In ydn-flash@yahoogroups.com, Josh Tynjala <josh@> wrote:
            > >
            > > The width and height properties of the children are set. If a child is
            > > designed to redraw when that happens, then it should redraw normally.
            > > If its just a regular old Sprite or MovieClip, then it'll stretch.
            > >
            > > - Josh
            > >
            > > On Sat, Jan 31, 2009 at 7:12 PM, Jim Cook <yahoo@> wrote:
            > > > When a component is added to a subclass of HBoxPane and the
            container
            > > > has been configured to layout its children using a percentWidth or
            > > > percent Height property, does the container stretch the
            components, or
            > > > do these children get an opportunity to redraw themselves at
            their new
            > > > height and width?
            > > >
            > > >
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.