--- In flexcoders@yahoogroups.com, "simonjpalmer" <[EMAIL PROTECTED]> wrote: > > I have the requirement for a button which has text writton on it like > the spine of a book, so rotated clockwise by 90 degrees. > > I have been looking at threads about text rotation but haven't found > anything which exactly matches my requirement. Anyone know how to do > this in Flex 2? Or know of a component I can grab which does it? > > TIA > Simon >
Hey Simon, a very simple solution would be to create a custom Button class that extends mx.controls.Button. In that class you could override the createChildren method to rotate the internal textField (it's a protected member of the Button class that is used to render the button's label). Example: override protected function createChildren():void { super.createChildren(); if (textField) { textField.rotation = 15; } } Note that this will probably mess with the component's measurements. You might have to override the measure method as well to make sure that your button component delivers correct sizes. -- david keutgens software consultant cynergy australia web | http://www.cynergysystems.com.au