View Full Version : UIscrollbar shows up for textfield even if doesnt overflow

03-16-2006, 07:00 PM
The UIscrollbar componant shows up for a textfield its binded to even if doesnt the textfield doesnt overflow which looks ugly...
the picture explains it all. any suggestions?
maybe check to see somehow if textfield overflows, and if so hide the UIscrollbar? is that the solution?

the scrolbar shows up for the text scores on the left, u can see it next to the words 'weak, puny human' hehe

03-18-2006, 12:59 AM
Have a look...

03-01-2008, 12:27 PM
Found a simpler way:

//count the number of lines the text field shows, e.g. 28
//if it is showing more than 28, then bottomScroll will always equal 28
//if it is showing less, then bottomScroll will be less then 28

if(text.bottomScroll >= 28){
trace (". turning scrollbar on");
textScrollBar.visible = true;
} else {
trace (". turning scrollbar off");
textScrollBar.visible = false;

11-20-2008, 07:14 PM
Could also try...

_text.text = _allText;
if (_text.numLines >= 9) {
trace (". turning scrollbar on");
_scroller.visible = true;
} else {
trace (". turning scrollbar off");
_scroller.visible = false;