flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "carlos.velasco.blanco" <carlos.velasco.bla...@gmail.com>
Subject RE: Resizable Component that manages to keep its proportions
Date Thu, 15 Aug 2013 21:34:17 GMT
You can extend the Button class or the skin class (whichever you prefer) to update height value
everytime the width is changed and to update width whenever height is also changed.

As Button is a component it follows the common Component cycle, so do not place the code at
the width and height function definitions, but in the properties changed function.

Cheers, Carlos.

Enviado desde Samsung tabletArne Broedel <arne@trainon.net> escribió:Hi Flex-Community,
I am skinning a Button with an icon. The Button should be sizable but keep
its proportions.
Its proportions width to height is 2 to 1. So every time the width is
changed the height shall change to width/2 and every time the height is
changed the width shall change to height*2.
Anyone can tell me a proper solution.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message