Programmatically set borderStyle in flex

To set a borderStyle on a canvas you can do:

<mx:Canvas x="332" y="329" width="264" height="44" borderStyle="solid">

To set borderStyle and other styles in code you can use the setStyle method…

package com.devbaldwin.borderedCanvas
{
	import mx.containers.Canvas;
	public class borderedCanvas extends Canvas
	{
		public function borderedCanvas()
		{
			super();
			this.setStyle("borderStyle", "solid");
		}
	}
}

A

Leave a Comment