Author Topic: Problem with UIDraggablePanel with Scroll Bar  (Read 2341 times)

hungweng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Problem with UIDraggablePanel with Scroll Bar
« on: March 11, 2013, 03:08:10 AM »
Hi,

We encountered two issues regarding the UIDraggablePanel with scroll bar.

We're trying to create a listView with multiple items within it, we used Example 7 as reference to setup our scene.

1)
After we populate the list with items, the scrollBar updates its size accordingly, if we destroy the items one by one within the list, the scrollBar also updates its size automatically.
However, if we delete all the items at once, the scrollBar doesn't change at all.
This only happens when the UIPanel's clipping mode is not Soft Clip.

2)
We called uiPanel.ResetPosition() after we destroy all the item within the list, trying to reset panel's position back to the first position in the list, but it doesn't do what we expected it to do, if we re-populate the list, the list view is still at the position before we deleted the items.

Did anyone else experienced the same issues? Or maybe we're doing something wrong?

Thanks in advance

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UIDraggablePanel with Scroll Bar
« Reply #1 on: March 11, 2013, 09:22:35 AM »
Have you tried calling UIDraggablePanel.UpdateScrollbars()?

hungweng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Problem with UIDraggablePanel with Scroll Bar
« Reply #2 on: March 11, 2013, 09:06:00 PM »
Hi ArenMook,

Yes we did, we tried calling UpdateScrollbars, but the scrollbar still doesn't change.
The scrollBar updates correctly only if the panel's clipping mode is Soft Clip.

As for the issue No.2, we managed to fix that by calling the ResetPosition after we re-populate the list instead.