Are you aware that if you want a bunch of 100 x 30 buttons, you don't have to specify width="100" height="30" on every one of them? Just make a 2-line custom component that defines default values for these properties and then use it instead:

 

MyButton.mxml:

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="30"/>

 

MyApp.mxml:

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:my="*" width="600" height="600">

    <my:MyButton/>

    <my:MyButton/>

    <my:MyButton/>

</mx:Application>

 

A lot of developers don't realize that custom components are useful for simple things like this.

 

- Gordon

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Gordon Smith
Sent: Friday, March 03, 2006 9:57 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Button height and width in CSS?

 

By design; x, y, width, and height are regular properties, not styles.

 

- Gordon

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Pablo Apanasionek
Sent: Friday, March 03, 2006 5:39 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Button height and width in CSS?

 

Is it a bug or by design, that button's height and width can't be set through CSS?

 

Thanks

---Pablo Gustavo Apanasionek





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to