Hold on a minute. Canvas uses absolute positioning. So "padding" would only affect percentage resizing? And 0,0 would still be top left corner, regardless of the padding?
This seems kind of confusing. I'm with Tim, and think this would be better solved with constraints. I suppose you could declare Spacers of height="100%" and whatever width you wanted, and position them with constraints. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff Sent: Friday, October 17, 2008 12:01 PM To: [email protected] Subject: [flexcoders] Re: how to add internal padding in canvas? Another alternative, if you have to use a Canvas and don't want to subclass, is to use constraints (top, bottom, left, right) on the children. -TH --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "markflex2007" <[EMAIL PROTECTED]> wrote: > > Hi,Mike > > Please let me know this in detail. > > I can extends Canvas and create a new class (like samrtcavas). > > I confuse how to use the class in mxml and how to set left/right paddings > > Thanks for your help > > Mark > > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Michael Schmalle" > teoti.graphix@ wrote: > > > > A hack that can be done if you really want Canvas is; > > Create a subclass of Canvas and override the usePadding property. > > > > override mx_internal get usePadding():Boolean > > { > > return true; > > } > > > > This will turn the padding back on when the > > layout calculates viewMetricsAndPadding. > > > > Mike > > >

