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


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

Submitted by:  Paul Williams <aviancer>
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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.


| ITEM 38 |
| ITEM 39 |
| ITEM 40 |*


| ITEM 40 |*
|         |
|         |

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();


      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:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




No changes have been made to this item

Back to the top

Powered by Savane 3.7