Hi everyone,

I have a kind of philosophical question about the size of the Flex
standard controls and its customization. The big problem here is the
measurement of the minimum size of every control (width and height)
which is often too big. Especially the height is in my opinion a hell
to customize. I stumbled over this topic several times now and it
seems there are many different custom solutions for it, whereas it
should be addressed by the framework itself.

I am saying that the way the framework measures the components is far
too ugly. There are hard-coded values and constants in it which a
developer cannot customize at all - unless he or she overwrites the
measure method of this control by his/her own. Where exactly these
values come from? Think only the dev of the component knows (as always
comments usually are used for describing the code and not the sense
behind it...).

The customization ways I found are:
1. Overwrite every control, override the measurement method. This is
the nicest of all of my solutions but by far the most time-consuming.
You have to think about the testing, the alignment, the baseline, the
customization, etc... Additionally, these new components have to be used.
2. Use negative paddings to achieve the desired effect (e.g. of
reducing the height). Unfortunately, this is not implemented in many
controls of Flex 2 (missing paddingTop/paddingBottom) and it could be
problematic in Flex 3 in terms of alignment, baseline, etc.
3. Use skins with no borderMetrics. Here goes the same as for negative
paddings, some controls are using borderMetrics, some aren't.
4. Use absolute heights/widths for achieving the results. But what
about resizing/internationalization/scaling/relabeling/etc? Not a good
solution.
5. Going some kind in a different direction: Go to UIComponent in the
FlexSDK and put in a method for customizing the size of each control
via CSS. It is the same as point 4 but the size can be set and
administered in a single file (which a designer can read) and can be
changed with the design.

Do you have any other solutions or quick-wins to achieve different min
sizes (as I said, especially the height) of Flex 2/3? Which solution
would you prefer and why? Do you also have these problems? Are there
any kinds of statements of Adobe to the same topic?

Unfortunately, it is not that an easy topic. I look forward to hearing
your comments.

-Thomas

Reply via email to