Hi,
I've an annoying problem with a scrollablepane - as soon as the content gets too high and the vertical scrollbar apprears it's also neccessary to scroll horizontally. It seems that the pane-contents are not resized because of the smaller inner-pane-width (that is reduced by the verticalscrollbar-width). The pane-contents are a verticallayoutcontainer that owns some windows with width = UDim(1,0) ... I've already tried to call layout() in the layoutcontainer after its childs are added but no success.
Thanks for any advice
rob
ScrollablePane HorizontalScrollbar
Moderators: CEGUI MVP, CEGUI Team
Re: ScrollablePane HorizontalScrollbar
I've ran into something different before and it's likely a bug in scrollable pane but it wasn't discovered yet. Scrollable pane sometimes decides to go haywire and (at least for me) doesn't allow scrolling all the way to the end.
When scrollbars appear though, content inside is resized for me automatically. I remember I used to click on the scrollbar to make it resize but it resizes OK since I migrated to pixel size instead of mixed size.
Are you running svn branch or the official 0.7.2 release?
When scrollbars appear though, content inside is resized for me automatically. I remember I used to click on the scrollbar to make it resize but it resizes OK since I migrated to pixel size instead of mixed size.
Are you running svn branch or the official 0.7.2 release?
Re: ScrollablePane HorizontalScrollbar
I'm working with the 0-7 branch...
hmm I did some more testing/debugging and there's sth messy with the size- and layout-updates.
I think the steps of my use-case are:
--- manual ---
1. Empty scrollpane, contentpane-width = 100;
2. scrollpane->add(layoutcontainer)
3. layoutcontainer->add(some windows)
--- cegui-system ---
4. layoutcontainer->layout() in there absWidth is set to 100 because the scrollpane doesn't know that it needs to scroll yet - no scrollbars are shown that reduce layoutcontainer->getChildWindowContentArea()
5. scrollpane recognizes that contentpane is too big -> scrolling is enabled, contentpane stays at 100 because layoutcontainer-width is set to 100
--- manual ---
6. If I call layoutcontainer->layout() again (manually) the width reduces correctly, the scrollpane hides the horz-scollbar but still uses the HVScrollArea...
(I think the second layout succeeds somehow because the reduced contentarea of the scrollpane is routed to the layoutcontainer-children?!)
Additionally I noticed that my window-structure needs to render at least once to have size-updates...
Any ideas how to fix this w/o doing manual update-calls?
thanks
rob
hmm I did some more testing/debugging and there's sth messy with the size- and layout-updates.
I think the steps of my use-case are:
--- manual ---
1. Empty scrollpane, contentpane-width = 100;
2. scrollpane->add(layoutcontainer)
3. layoutcontainer->add(some windows)
--- cegui-system ---
4. layoutcontainer->layout() in there absWidth is set to 100 because the scrollpane doesn't know that it needs to scroll yet - no scrollbars are shown that reduce layoutcontainer->getChildWindowContentArea()
5. scrollpane recognizes that contentpane is too big -> scrolling is enabled, contentpane stays at 100 because layoutcontainer-width is set to 100
--- manual ---
6. If I call layoutcontainer->layout() again (manually) the width reduces correctly, the scrollpane hides the horz-scollbar but still uses the HVScrollArea...

(I think the second layout succeeds somehow because the reduced contentarea of the scrollpane is routed to the layoutcontainer-children?!)
Additionally I noticed that my window-structure needs to render at least once to have size-updates...
Any ideas how to fix this w/o doing manual update-calls?
thanks
rob
Last edited by r0br0y on Wed Sep 01, 2010 10:36, edited 1 time in total.
Re: ScrollablePane HorizontalScrollbar
I don't think absWidth is related, it's only used to compare mixed sizes... Unfortunately in my case this works ok
I will try some more to reproduce it.

Re: ScrollablePane HorizontalScrollbar
Kulik wrote:I don't think absWidth is related, it's only used to compare mixed sizes... Unfortunately in my case this works okI will try some more to reproduce it.
hmm you're aright, but in my case I'm using the verticallayoutcontainer and in its layout()-method the childWidth.asAbsolute(absWidth) evaluates to absWidth because child has a relative width of 1...
I think a possible fix would be a call to LayoutContainer::layout() in ScrollablePane::configureScrollbars(void) somewhere near to the performChildWindowLayout()-call... well but it's more a guess ...
thanks again for having one more look...
EDIT
Just one more note:
On another usecase I had a problem with a bottom aligned layoutcontainer that owns a single scrollablepane. Without a manual call to layout() after the windows are setup there is a one-frame-flickering/misplacement-at-top concerning the bottom-alignment... I'm wondering when layout() gets called by the system? before/on/after rendering?
Re: ScrollablePane HorizontalScrollbar
After some more debugging and
and
and
I managed to work around my problem of mixing layoutcontainers and scrollablepanes:
layout() has to be called for all layoutcontainers from bottom(nested/childs/leafs) to top (parents) of my window-structure so that child-sizes are valid for the next layout().
If the size of a scrollablepane needs to be adjusted it has to be set before or inbetween the layout()-calls (according to position in window-strucutre).
Any ideas how to improve this?
If you try to reproduce this try to create such a window-structure before the first rendering as it seems to result in a different behaviour if created later...
thanks
rob



layout() has to be called for all layoutcontainers from bottom(nested/childs/leafs) to top (parents) of my window-structure so that child-sizes are valid for the next layout().
If the size of a scrollablepane needs to be adjusted it has to be set before or inbetween the layout()-calls (according to position in window-strucutre).
Any ideas how to improve this?
If you try to reproduce this try to create such a window-structure before the first rendering as it seems to result in a different behaviour if created later...
thanks
rob
Re: ScrollablePane HorizontalScrollbar
there is a patch http://www.cegui.org.uk/phpBB2/viewtopic.php?f=5&t=5030&start=45#p24271 that might make this work flawlessly, I haven't tried though. Please try it and report back. It will probably go into CEGUI svn over the weekend.
EDIT: You have to inject time pulses with this patch, otherwise layouting will never happen!
EDIT: You have to inject time pulses with this patch, otherwise layouting will never happen!
Re: ScrollablePane HorizontalScrollbar
EDIT:
Works like a charme! Thanks!
Works like a charme! Thanks!
Who is online
Users browsing this forum: No registered users and 12 guests