Author Topic: Scrollable panel and moving the panel...  (Read 3849 times)

milali

  • Guest
Scrollable panel and moving the panel...
« on: February 04, 2013, 09:07:00 PM »
Hi,

I have a dynamically allocated set of uiitems inside a uitable. when the list is being populated the panel doesn't seem to move correctly when you scroll...

Now the panel itself does move when it is scrolled into screen for a transition. is that not possible?

lime-green.at

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 60
    • View Profile
Re: Scrollable panel and moving the panel...
« Reply #1 on: February 05, 2013, 03:02:50 AM »
Are you using the UITable function Reposition() after you populated it? As well you can try using ResetPosition() from your UIDraggablePanel.
http://www.tasharen.com/ngui/docs/class_u_i_table.html
http://www.tasharen.com/ngui/docs/class_u_i_draggable_panel.html

milali

  • Guest
Re: Scrollable panel and moving the panel...
« Reply #2 on: February 05, 2013, 04:36:23 AM »
yep the dict is the list of items

IEnumerator LoadItems()
   {       
        foreach (Dictionary<string, string> dict in items)
      {
         addItem(dict);
        }
      
      yield return new WaitForEndOfFrame();
      table.Reposition();
      draggablePanel.ResetPosition();
      panel.Refresh();
    }