Skip to main content
Participant
October 30, 2010
Question

Please help me how to set the UIScrollBar object(instancename) scroller at the end?

  • October 30, 2010
  • 1 reply
  • 315 views

this is my Code

onClipEvent(load)
{
conversationbox.wordWrap = true;
//my_bt.move(300, 100);
scrollInstanceName.enabled=true;
// Set the target text field.
scroller.setScrollTarget(conversationbox);
//if(scroller.height == conversationbox.maxScrollV)
//{
    //Move it next to the text field.
    scroller.move(conversationbox.x +  conversationbox.width , conversationbox.y);
    scroller.height = conversationbox.height;
    scroller.scrollPosition = conversationbox.maxscroll - 1;
    conversationbox.scroll = conversationbox.maxscroll;
//}
    scroller.update();
}

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
October 30, 2010

I am not certain what you are after, but I will suggest you move the update before the two lines where you set the scroll handle position and textfield scroll property.

    scroller.update();
    scroller.scrollPosition = conversationbox.maxscroll - 1;
    conversationbox.scroll = conversationbox.maxscroll;

Participant
October 30, 2010

I was trying to set the scrollPosition at the end.

I have done this by placing these two lines

scroller.scrollPosition = conversationbox.maxscroll;

conversationbox.scroll = conversationbox.maxscroll;

in the enter event handler.

Thanks for your reply murphy.