6 Replies Latest reply on Dec 18, 2008 12:30 PM by alice_data

    Absolute Positioning Text

    alice_data Level 1
      Hi,

      For variable passing purposes, I had to create a mx:Box that contains a few mx:Label elements to pass them as text elements. However, I don't want users to see these text elements, (I have changed the text so that it is white colored, but it still takes up my application space). I tried absolute positioning by specifying the x and y position, but it does not seem to work. Attached is the code of the mx:Box. If there are other ways I can fix it other than manipulating my Flex code, like CSS, I would also appreciate it.

      Alice
        • 1. Re: Absolute Positioning Text
          Level 7

          "alice_data" <webforumsuser@macromedia.com> wrote in message
          news:gibf1l$78a$1@forums.macromedia.com...
          > Hi,
          >
          > For variable passing purposes, I had to create a mx:Box that contains a
          > few
          > mx:Label elements to pass them as text elements. However, I don't want
          > users to
          > see these text elements, (I have changed the text so that it is white
          > colored,
          > but it still takes up my application space). I tried absolute positioning
          > by
          > specifying the x and y position, but it does not seem to work. Attached is
          > the
          > code of the mx:Box. If there are other ways I can fix it other than
          > manipulating my Flex code, like CSS, I would also appreciate it.

          includeInLayout="false"

          But you're probably better off passing data as data, not as UI elements.


          • 2. Re: Absolute Positioning Text
            matthew horn Level 3
            Could you set the Labels' "visible" property to false?

            matt horn
            flex docs
            • 3. Re: Absolute Positioning Text
              alice_data Level 1
              Hi, Amy:

              Is there any example that you could provide here? I saw something on the livedocs, but that is restricted to boxes. I am wondering if I could hide my text elements "behind the dataGrid, since I would only like the users to read what is on the dataGrid and not these text elements.

              Thanks again for your help.

              Alice
              • 4. Re: Absolute Positioning Text
                Level 7

                "alice_data" <webforumsuser@macromedia.com> wrote in message
                news:gidon2$7h6$1@forums.macromedia.com...
                > Hi, Amy:
                >
                > Is there any example that you could provide here? I saw something on the
                > livedocs, but that is restricted to boxes. I am wondering if I could hide
                > my
                > text elements "behind the dataGrid, since I would only like the users to
                > read
                > what is on the dataGrid and not these text elements.
                >
                > Thanks again for your help.

                If you don't want to set their includeInLayout and visible properties to
                false, you can just put them in a container that uses absolute layout, like
                a Canvas or Panel, then define them before the dataGrid.

                I can't give you an example of how to properly fix your code so that you're
                not using UI elements to pass data, because you didn't show what you're
                doing there.

                HTH;

                Amy


                • 5. Re: Absolute Positioning Text
                  Gregory Lafrance Level 6
                  I would put the data in a collection or object, not in empty UI elements.
                  • 6. Re: Absolute Positioning Text
                    alice_data Level 1
                    Thanks to all who replied. Interestingly, I used visible='false' on the box component that surrounds the mx:Label elements and had everything disappear from sight.

                    Alice