[Solved] Help with ScrollablePanes

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

[Solved] Help with ScrollablePanes

Postby zarroba » Tue Apr 08, 2008 16:16

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
Last edited by zarroba on Wed Apr 09, 2008 16:18, edited 1 time in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Apr 08, 2008 18:52

Hi,

Not certain at the moment - it should work as you wish it to.

Does the ScrollablePaneDemo sample application perform for you as you would expect (it does here in a quick test).

Can you post the widget creation code or XML?

CE.

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

Postby zarroba » Wed Apr 09, 2008 08:45

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:

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

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

Postby zarroba » Wed Apr 09, 2008 11:17

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

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

Postby zarroba » Wed Apr 09, 2008 14:26

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

zarroba
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Tue Jul 11, 2006 12:54

Postby zarroba » Wed Apr 09, 2008 16:23

Problem solved. The problem was not in CEGUI (of course! how could I think such thing). Sorry guys.. I'm using CEGUI with OGRE and OIS and the problem was in the connection between OGRE and OIS.
Sorry once again guys.

José Tavares

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Apr 10, 2008 08:40

Hi,

Glad you fixed it. I was going to suggest it might be related to having content that has scrollbars - stealing the input that should go to the pane, but obviously not! ;)

Feel free to use a forum thread in a blog-like manner. Not only did you find it useful, but it's also useful for others.

CE.


Return to “Help”

Who is online

Users browsing this forum: Google [Bot] and 18 guests