Skip navigation
Currently Being Moderated

How might you draw a border around a rectangle in Flex?

Jun 12, 2013 12:34 PM

Tags: #flex-4.6 #flex_mobile

I need to know how to draw a gray border around a rectangle using MXML, without filling the rectangle with any color. I also need to know how to design the screen so that the components (in this case I have a couple text input fields, a button, and a checkbox) appear within the rectangle. The rectangle should not take up the entire width or height of the screen.

  • Currently Being Moderated
    Jun 12, 2013 1:04 PM   in reply to ic3man7019
    Mark as:
  • Currently Being Moderated
    Jun 13, 2013 8:45 AM   in reply to ic3man7019

    Use a Group. Set its width and heigth to whatever size. Inside the group use a Rect with width and height of 100%. Give it a stroke.




    <s:Group width="100" height="100">

    <s:Rect width="100%" height="100%">










              <s:SolidColor color="#ffffff" />//if this color value doesn't work then use 0xffffff



              <s:SolidColorStroke weight="1" color="#000000"  />//if this color value doesn't work then use 0x000000




    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points