bugParaGUI - Bugs: bug #9624, ListBox::ScrollToWidget() behaves...

 
 

bug #9624: ListBox::ScrollToWidget() behaves suprisingly

Submitter:  Paul Williams <aviancer>
Submitted:  Tue 13 Jul 2004 05:40:48 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 13 Jul 2004 05:40:48 AM UTC, original submission:  

Using ListBox::ScrollToWidget() scrolls such that the item requested scrolls to TOP of ListBox widget, even if it is the last item.  This is suprising because I was hoping that it would scroll the minimum amount necessary to get the item on the listbox.

Scrollbar is also misplaced at the top of the box, even though the (only) widget showing is the last item.

Hope:

+---------+^
| ITEM 38 |
| ITEM 39 |
| ITEM 40 |*
+---------+V

Experience:

+---------+^
| ITEM 40 |*
|         |
|         |
+---------+V

This behavior is easily demonstrated by adding three lines in handleListBoxItem() in the listbox.cpp test:

  bool handleListBoxItem(PG_ListBoxBaseItem* item) {
      static int counter = 1;
      char text[20];
+     PG_ListBoxItem * newlbi;

      PG_ListBox* list = item->GetParent();

      list->DeleteAll();

      for(int i=0; i<10; i++) {
          sprintf(text,"NewItem %i", counter++);
+         newlbi = new PG_ListBoxItem(list, 25, text);
      }
+     list->ScrollToWidget( newlbi);

      return true;
}

Paul Williams <aviancer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code