--- In [email protected], "Leon Tanner" <[EMAIL PROTECTED]> 
wrote:
>
> Hi,
> I think in any case, we'll need a fixed width font...  Could be 
wrong
> though...
> Do you mean you would like to know how to show the clipped contents
> within the text area/input?
> Leon

Hi,
mx:Text component can and does clip its contents all by itself. Say, 
I have text like "Polly wants a cracker" and I set that to Text.text 
property, Text having fixed, too small width and height. Now the 
component only displays eg. "Polly wants a". If I now look at the 
Text.text property it still contains "Polly wants a cracker". There 
is no straightforward programmatical way to determine what REALLY is 
displayed in the Text field (or is there??). 
However, just after setting the text, I can compare eg. 
preferredWidth and width of the Text component. If the contents 
are "too long", the preferredWidth usually is bigger than actual 
width. This solves my original problem. The second part came as side 
effect.. 

Satu

> 
> 
> 
> -----Original Message-----
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of svktiilikainen
> Sent: 10 January 2006 10:47
> To: [email protected]
> Subject: [flexcoders] Re: How to determine the content length in
> mx:Text?
> 
> Hi,
> 
> and yes, I already viewed your question which is close to what I 
was 
> seeking. In my case, I do not need dynamic size increase, just to 
> find out that contents are larger than the component can show. It 
> would also be great to be able to tackle, after setting the text, 
> the contents that CAN be shown, ie. the clipped contents.
> 
> Satu
> 
> --- In [email protected], "Leon Tanner" <[EMAIL PROTECTED]> 
> wrote:
> >
> > Hi Satu,
> > Is the question I am asking 'Dynamically increasing size of 
> container to
> > fit all characters' of interest?  I haven't got any solutions as 
> yet,
> > but it may be useful...  
> > Leon
> > 
> > 
> > -----Original Message-----
> > From: [email protected] 
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of svktiilikainen
> > Sent: 10 January 2006 09:16
> > To: [email protected]
> > Subject: [flexcoders] Re: How to determine the content length in
> > mx:Text?
> > 
> > OK, probably managed to solve this. I can always compare 
> > preferredHeight with height and preferredWidth with width, and 
> this 
> > seems to work for now.
> > 
> > Satu
> > 
> > --- In [email protected], "svktiilikainen" 
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > > 
> > > does anyone know how you can determine the length of text in 
> mx:Text 
> > > component before the component is drawn?
> > > In other words, is it possible to find out that the to-be 
> contents 
> > of 
> > > a Text component are too big to fit into the component without 
> > > clipping? The Text component here is of fixed width & height, 
> > > multiline, and can contain basically any number of characters, 
> line 
> > > breaks etc.
> > > 
> > > Satu
> > >
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > 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
>






--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to