Welcome,
Guest
. Please
login
or
register
.
April 24, 2025, 10:52:08 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Label inside a scroll panel. Updated text isn't positioned to top
« previous
next »
Print
Pages: [
1
]
Author
Topic: Label inside a scroll panel. Updated text isn't positioned to top (Read 1651 times)
jchristof
Guest
Label inside a scroll panel. Updated text isn't positioned to top
«
on:
June 20, 2013, 01:04:21 PM »
Are there steps I can take to reset the text and scroll bar both to the top if new text is applied to the label?
Thanks!
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Label inside a scroll panel. Updated text isn't positioned to top
«
Reply #1 on:
June 20, 2013, 01:38:02 PM »
Automatically? No. Manually? Sure. When you set your text's label, also reset the scroll bar's position.
Logged
jchristof
Guest
Re: Label inside a scroll panel. Updated text isn't positioned to top
«
Reply #2 on:
June 20, 2013, 06:18:33 PM »
Right, I guess I was looking for an alternative to this which doesn't seem to position new text to the top of the scroll panel:
GameObject
.
Find
(
"Label inside the scroll panel"
)
.
GetComponent
<
UILabel
>
(
)
.
text
=
Text
.
getText
(
text
)
;
GameObject
.
Find
(
"ScrollBar"
)
.
GetComponent
<
UIScrollBar
>
(
)
.
scrollValue
=
0
;
GameObject
.
Find
(
"ScrollBar"
)
.
GetComponent
<
UIScrollBar
>
(
)
.
ForceUpdate
(
)
;
But grabbing and pulling the scrollbar works as expected.
«
Last Edit: June 20, 2013, 07:24:42 PM by jchristof
»
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Label inside a scroll panel. Updated text isn't positioned to top