ScrollablePane doesn't show up - crash on window resize

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

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: ScrollablePane doesn't show up - crash on window resize

Postby Ident » Thu May 28, 2015 12:57

I changed the layout a bit and i can resize it without issues. I think what causes the problem is that the child window (statictext) is bigger (in relative dimensions) than the scrollablepane. Apparently this was never noticed to cause such issues and has never been considered to be tested. Clearly this is a bug in CEGUI and not in your code, sorry for earlier statements where I assumed something else. This is a rare find but nevertheless needs to be fixed. However, I can't seem to find a quick fix for this. WRONG: Apparently the ScrollablePane attempts to retrieve its scrollbar, however there is no scrollbar, and this leads to the whole issue..

The window keeps resizing itself recursively through events that are fired. This results in a stack overflow.

Anyways, here is what I changed regarding the StaticText:

Code: Select all

                <Window name="conTextfield" type="TaharezLook/StaticText">
                   
                    <Property name="VertFormatting" value="TopAligned" />
                    <Property name="Area" value="{{0.00230216,0},{-0.645041,0},{0.9,0},{0.349997,0}}" />
                </Window>


So basically I only restricted the right end of the area to relative size of 0.9. This seems to solve it. Please try this small change out and report back if it solves it.

Also please remember to always have a DefaultWindow with rel size 1,1 as root as done in the samples. It is not recommended to use something else as root, as this will lead to issues with event handling (mouse inside/outside) etc.
CrazyEddie: "I don't like GUIs"

gams
Not too shy to talk
Not too shy to talk
Posts: 39
Joined: Sun May 24, 2015 13:23

Re: ScrollablePane doesn't show up - crash on window resize

Postby gams » Thu May 28, 2015 13:36

Ident wrote:
So basically I only restricted the right end of the area to relative size of 0.9. This seems to solve it. Please try this small change out and report back if it solves it.

Also please remember to always have a DefaultWindow with rel size 1,1 as root as done in the samples. It is not recommended to use something else as root, as this will lead to issues with event handling (mouse inside/outside) etc.


I can verify that the change in xml fixes the problem. Thanks Ident.

Do you know why the scrollbars dont show up? TaharezLook/ScrollablePane is defined in the layout.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: ScrollablePane doesn't show up - crash on window resize

Postby Ident » Thu May 28, 2015 13:40

gams wrote:
Ident wrote:
So basically I only restricted the right end of the area to relative size of 0.9. This seems to solve it. Please try this small change out and report back if it solves it.

Also please remember to always have a DefaultWindow with rel size 1,1 as root as done in the samples. It is not recommended to use something else as root, as this will lead to issues with event handling (mouse inside/outside) etc.


I can verify that the change in xml fixes the problem. Thanks Ident.

Do you know why the scrollbars dont show up? TaharezLook/ScrollablePane is defined in the layout.


They do show up once you add something as child that exceeds the dimensions of the window. You can also force them to show up via a ScrollablePane property (ForceVertScrollbar etc)

I added a ticket: https://bitbucket.org/cegui/cegui/issue ... ively-if-a
CrazyEddie: "I don't like GUIs"

gams
Not too shy to talk
Not too shy to talk
Posts: 39
Joined: Sun May 24, 2015 13:23

Re: ScrollablePane doesn't show up - crash on window resize

Postby gams » Thu May 28, 2015 13:53

Ident wrote:
gams wrote:
Ident wrote:
So basically I only restricted the right end of the area to relative size of 0.9. This seems to solve it. Please try this small change out and report back if it solves it.

Also please remember to always have a DefaultWindow with rel size 1,1 as root as done in the samples. It is not recommended to use something else as root, as this will lead to issues with event handling (mouse inside/outside) etc.


I can verify that the change in xml fixes the problem. Thanks Ident.

Do you know why the scrollbars dont show up? TaharezLook/ScrollablePane is defined in the layout.


They do show up once you add something as child that exceeds the dimensions of the window. You can also force them to show up.


Hmm it seems that no matter how much text I put in the window the bars dont show up.

here's a pic:

Image
uploading pictures

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: ScrollablePane doesn't show up - crash on window resize

Postby Ident » Thu May 28, 2015 13:57

Please don't diverge from the original topic. Also adding text to the child window clearly does not size the statictext window. Why would you assume that? And even stranger is your assumption that this would influence the parent window. I don't know what you are trying to do but you might wanna look into the Samples to see how things work, i assume you want a scrollbar for the StaticText window which has NOTHING to do with the scrollablePane. For everything that is not related to the bug make a new topic.
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 10 guests