Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: LightStorm on April 23, 2014, 04:51:33 AM

Title: REQUEST: Number of printed lines in UILabel
Post by: LightStorm on April 23, 2014, 04:51:33 AM
Could you please add number of printed lines to UILabel component? Sometimes it's very useful to see how many lines of text was used.
Title: Re: REQUEST: Number of printed lines in UILabel
Post by: ArenMook on April 23, 2014, 06:19:17 AM
label.text.Split('\n').Length;
Title: Re: REQUEST: Number of printed lines in UILabel
Post by: LightStorm on April 23, 2014, 07:54:20 AM
Yes, but I need number of printed lines when I use fixed width for label and text was wrapped.
How can I do that?
Title: Re: REQUEST: Number of printed lines in UILabel
Post by: ArenMook on April 23, 2014, 08:02:29 AM
label.processedText.Split('\n').Length;
Title: Re: REQUEST: Number of printed lines in UILabel
Post by: LightStorm on April 23, 2014, 08:38:03 AM
Thanks.
BTW: It's works but this solution is time consuming especially with big amount of text.