New Toronto Group
 - New Toronto Group

Creating an HRule in MXML with Spark Components

| Posted on January 10th, 2012 by Chad Upton


By Chad Upton - senior consultant



Although there is an MX HRule component, there is not a Spark equivalent. You could still use the mx component, but it's better to use a vector graphic for something as simple as a straight line -- particularly if you're building a mobile application.

For a horizontal rule, you can simple set the width of the line, the color, and the weight (stroke/thickness).

[cc lang="mxml" escaped="true"]





[/cc]
You can also draw a line from point to point:
[cc lang="mxml" escaped="true"]





[/cc]
Be sure to "like" us on facebook to stay in the loop and checkout our course calendar for flex, html5, javascript, and other platform training programs -- online and in the classroom.

Posted in 4.6, Flex, hrule, line, mx, sdk, solidcolorstroke, spark, vector, vrule  | Comments (0)

Comments (0)


Add a Comment





To use reCAPTCHA you must get an API key from http://recaptcha.net/api/getkey

Allowed tags: <b><i><br>Add a new comment: