4 Replies Latest reply on Oct 23, 2008 2:58 PM by Newsgroup_User

    Setting a Canvas Height to 'auto'

    MixMastaJames Level 1
      is there a way to set a canvas height back to "auto" when you change it? (or maybe there is a better way to do this...)

      I have a VBox that has canvases in it that have a checkbox inside.. once the checkbox is checked and marked as "complete" it sets the height of the canvas to 0 to make it hide and make everything appear to move up on the list. I have an option to "show completed items" which I want to go through the canvases again and set there height back to "auto"

      Is there a way to do that? or a better way to accomplish this?

      Thanks.
        • 1. Re: Setting a Canvas Height to 'auto'
          Level 7

          "New to AS3" <webforumsuser@macromedia.com> wrote in message
          news:gdpv3v$rie$1@forums.macromedia.com...
          > is there a way to set a canvas height back to "auto" when you change it?
          > (or
          > maybe there is a better way to do this...)
          >
          > I have a VBox that has canvases in it that have a checkbox inside.. once
          > the
          > checkbox is checked and marked as "complete" it sets the height of the
          > canvas
          > to 0 to make it hide and make everything appear to move up on the list. I
          > have
          > an option to "show completed items" which I want to go through the
          > canvases
          > again and set there height back to "auto"

          Why not just set the includeInLayout property on the canvases?


          • 2. Re: Setting a Canvas Height to 'auto'
            MixMastaJames Level 1
            Booyah! thanks I figured there was an easier solution!
            • 3. Re: Setting a Canvas Height to 'auto'
              MixMastaJames Level 1
              OK I've started using this.. and for a while figured this was the perfect answer.. but...

              Most of the canvases are about 30 height.. but some are a bit bigger.. and once they start setting the "includeInLayout" to false, you start seeing some of the "larger" height's interior components visible..

              why is that? I tried to do sometihng like:
              <mx:DataGrid includeInLayout="{canvasObj01.includeInLayout}">

              but it won't set that to false.

              Sure there is some workaround to a glitch.. anyone know it?
              • 4. Re: Setting a Canvas Height to 'auto'
                Level 7

                "New to AS3" <webforumsuser@macromedia.com> wrote in message
                news:gdqfgs$kn5$1@forums.macromedia.com...
                > OK I've started using this.. and for a while figured this was the perfect
                > answer.. but...
                >
                > Most of the canvases are about 30 height.. but some are a bit bigger.. and
                > once they start setting the "includeInLayout" to false, you start seeing
                > some
                > of the "larger" height's interior components visible..
                >
                > why is that? I tried to do sometihng like:
                > <mx:DataGrid includeInLayout="{canvasObj01.includeInLayout}">
                >
                > but it won't set that to false.
                >
                > Sure there is some workaround to a glitch.. anyone know it?

                Try setting both the includeInLayout and visible properties to false.