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: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich 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.

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 File(s):
   
   
Comment:
   

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 click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup