Welcome,
Guest
. Please
login
or
register
.
June 11, 2026, 02:55:34 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
REQUEST: Number of printed lines in UILabel
« previous
next »
Print
Pages: [
1
]
Author
Topic: REQUEST: Number of printed lines in UILabel (Read 9098 times)
LightStorm
Newbie
Thank You
-Given: 0
-Receive: 1
Posts: 17
REQUEST: Number of printed lines in UILabel
«
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.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: REQUEST: Number of printed lines in UILabel
«
Reply #1 on:
April 23, 2014, 06:19:17 AM »
label.text.Split('\n').Length;
Logged
LightStorm
Newbie
Thank You
-Given: 0
-Receive: 1
Posts: 17
Re: REQUEST: Number of printed lines in UILabel
«
Reply #2 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?
«
Last Edit: April 23, 2014, 08:00:49 AM by LightStorm
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: REQUEST: Number of printed lines in UILabel
«
Reply #3 on:
April 23, 2014, 08:02:29 AM »
label.processedText.Split('\n').Length;
Logged
LightStorm
Newbie
Thank You
-Given: 0
-Receive: 1
Posts: 17
Re: REQUEST: Number of printed lines in UILabel
«
Reply #4 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.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
REQUEST: Number of printed lines in UILabel