display something like this:
<mx:Button textAlign="left" label="{'Restore Close ' +'\n'+ 'Default
Settings'}" height="140" width="500" />
When I try in Flex 2.0, it behaves as described in the Flex 2.0 books:
"If you explicitly size a Button control so that it is not large enough to
accommodate its label, the label is truncated and terminated by an ellipses
(...). The full label displays as a tooltip when you move the mouse over
the Button control. If you have also set a tooltip using the tooltip
property, the tooltip is displayed rather than the label text."
I get the tooltip to display the complete label in the example above. As
you can see, the height would be more than enough to display both lines,
but it display the ellipses.
|---------+----------------------------->
| | |
| | "bhaq1972" |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | flexcoders@yahoogroups.com |
| | 04/21/2006 06:58 AM |
| | Please respond to |
| | flexcoders |
| | |
|---------+----------------------------->
>-----------------------------------------------------------------------------------------------------------------------------|
| |
| To: flexcoders@yahoogroups.com |
| cc: |
| Subject: [flexcoders] Re: Flex2B2 - How to show a button label over 2 lines |
>-----------------------------------------------------------------------------------------------------------------------------|
sounds like a lot of work for something that was straight forward in
flex1.5.
> however, a button with multiple lines of text as label is....kinda
weird.
not as weird as you might think. in our flex 1.5 app, we had our own
version of a buttonbar which appeared below a datagrid showing stock
(for eg).
usually a two word description on a button label eg "release
stock", "hold stock", better describes the action of the button ....
as well as significantly reducing the width of the overall button
bar.
--- In flexcoders@yahoogroups.com, "jeremy lu" <[EMAIL PROTECTED]> wrote:
>
> don't have FB at hand to check the code, but I think button's
using a
> mx.controls.Label component to show the text as label, and label
component
> only allow single line content.
>
> you might have to extends Button and override createChildren() and
> updateDisplayList() to swap out the label component then use a
plain
> textfield instead.
>
> however, a button with multiple lines of text as label is....kinda
weird.
>
> On 4/21/06, bhaq1972 <[EMAIL PROTECTED]> wrote:
> >
> > in flex1.5 i could do this
> >
> > <mx:Button label="Hello
> > World" height="40"/>
> >
> > the same thing in flex2b2 doesn't work. any ideas how i can
achieve
> > this.
> >
> > thanks
> >
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> >
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.