I'm having some trouble with scrollable panes. I create a scrollable pane, add items to it until the scrollbars show up but the scrolling doesn't seems to be working fine. When I scroll the mouse wheel with the mouse on top of the ScrollThumb, Buttons or childs added to the ScrollablePane the scrollable pane area is scrolled. If I scroll with the mouse on top of the background it doesn't scroll.
Any idea of what is happening?
Thanks,
José Tavares
[Solved] Help with ScrollablePanes
Moderators: CEGUI MVP, CEGUI Team
[Solved] Help with ScrollablePanes
Last edited by zarroba on Wed Apr 09, 2008 16:18, edited 1 time in total.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
The strange thing is that the sample works fine. I'm using CEGUI in a dynamic environment where overlays are added and removed during the program. but the code I use to create an overlay is the following:
I create a StaticImage with a ScrollablePane inside and inside the ScrollablePane I add a variable number of Editbox.
I use the same code, but with different variables, to create the scrollable pane and the editboxs inside. The editboxs are well added, the scrollbars appear when an editbox is added in a position bigger than the size, but the scroll listener doesn't work in the background of the scrollable pane.
Oh, I'm using CEGUI 0.5 but I've checked the files and the code and looknfeel seems to be the same.
Thanks,
José Tavares
Code: Select all
component = mWindowManager->createWindow(type,id);
rootComponent->addChildWindow(component);
this->setOverlayPosition(idRepresentation,posX,posY); //function to set the position
this->setOverlaySize(idRepresentation,sizeX,sizeY); //function to set the size
component->setDestroyedByParent(true);
component->setInheritsAlpha (true);
component->setText(title);
component->show();
this->setFont2Default(fontID); //function to set the font
I create a StaticImage with a ScrollablePane inside and inside the ScrollablePane I add a variable number of Editbox.
I use the same code, but with different variables, to create the scrollable pane and the editboxs inside. The editboxs are well added, the scrollbars appear when an editbox is added in a position bigger than the size, but the scroll listener doesn't work in the background of the scrollable pane.
Oh, I'm using CEGUI 0.5 but I've checked the files and the code and looknfeel seems to be the same.
Thanks,
José Tavares
Hi, I've been checking several widgets and some work and some doesn't. So, if I add Editbox, Checkbox, RadioButton, Button, Window the scroll of the scrollable pane (the parent). If I add StaticImage, Multiline, StaticText, Listbox the scroll won't work. In both cases the background of the ScrollablePane never works. Can this problem come from the LooknFeel?
José Tavares
José Tavares
Update on my latest try. I'm thinking it's something about the version of CEGUI. The sample I've tried was with CEGUI 0.6 and I'm using version 0.5 on my project, and I'm not considering updating it. In the onMouseWheel method of MultiLineEditbox I've commented the "e.handled = true;" line at the end of the method. I've checked and this line is there in both versions. The fact is that after the change the scroll worked. Is there anything different in the way the listeners are handled in both versions?
Update: I've tried to comment the same line on the other classes that have the onMouseWheel method and it didin't work. Basically I'm still with the same problem.
José Tavares
P.S. Sorry for using this as a blog but it's being really helpful and I still may get some help
Update: I've tried to comment the same line on the other classes that have the onMouseWheel method and it didin't work. Basically I'm still with the same problem.
José Tavares
P.S. Sorry for using this as a blog but it's being really helpful and I still may get some help
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Who is online
Users browsing this forum: Google [Bot] and 18 guests