Absolutely yes.
I think (and correct me if I am wrong because I have never really coded
with actionscript and flash api) that flash is capable of reproducing
anything that html+css+js can.
So it makes sense to include every (useful) feature dhtml has. Laszlo
started the other way around which has made some features irreproducible
in dhtml environment.
And as an occasional website developer I must say these 4 attributes are
used often.
There is one amendment I have to add.
Very often when I look at my web page source, I see strings such as these:
padding-top, margin-right, borderwidth-bottom, bordercolor-left ...
So should we add 20 attributes instead of 4?
I did a laszlo class which accepts all these 20 attributes but everyone
can imagine just how many views it takes to implement it with simple
views. 4 sides X (padding view + borderview + marginview) = 12 views.
So I quess it's rather expensive.
better to have it as part of a view
Further when those dimensions are part of a view features like mouse
dragging works correctly on them (although it is debatable if mouse
should be considered to be on the view when it is on top of it's padding).
- rami
Max Carlson wrote:
See here for more details on how box model works:
http://www.w3.org/TR/CSS2/box.html#box-dimensions
I propose adding four attributes to view, to support CSS2 box model:
padding: Specifies the number of pixels used for padding around the view
margin: Specifies the number of pixels used for margins inside th view.
borderwidth: Specifies the width of the border, in pixels.
bordercolor: Specifies the color of the border, as a CSS color value.
The risk is, padding, border and margin may be used in existing
applications. I already found a case in lz/tabs.lzx that used
'padding'. In most cases, these attributes can simply be renamed.
Please send your thoughts! I'd like to get this finalized in time for
the 4.7 release.