ScrollablePane clipping issue.

Create issue
Issue #486 resolved
Paul Turner created an issue

ScrollablePane will, under certain conditions, incorrectly clip the edges of the content area as if the scrollbar were shown, even when it is not.

Seems to be some sync issue regarding measuring the content rect and the visible area rect.

Reproducibility: always

Steps to reproduce: Plugging this code in via a sample reproduces the issue. Sizing the host frame window - setting the size manually after adding all content seems to fix it.

using namespace CEGUI;

SchemeManager::getSingleton().create("TaharezLook.scheme"); System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow"); WindowManager& winMgr = WindowManager::getSingleton(); DefaultWindow* root = (DefaultWindow*)winMgr.createWindow("DefaultWindow"); System::getSingleton().setGUISheet(root); Window* wnd = winMgr.createWindow("TaharezLook/FrameWindow"); root->addChildWindow(wnd);

wnd->setPosition(UVector2(cegui_reldim(0.25f), cegui_reldim( 0.25f))); wnd->setSize(UVector2(cegui_reldim(0.5f), cegui_reldim( 0.5f)));

Window* sp = winMgr.createWindow("TaharezLook/ScrollablePane"); wnd->addChildWindow(sp); sp->setPosition(UVector2(cegui_reldim(0), cegui_reldim(0))); sp->setSize(UVector2(cegui_reldim(1), cegui_absdim(50)));

adding this window causes the issue, without this, it's ok. Window* dw = winMgr.createWindow("DefaultWindow"); sp->addChildWindow(dw);

float x = 0; for (int i = 0; i < 10; ++i) { Window* b = winMgr.createWindow("TaharezLook/Button"); b->setPosition(UVector2(UDim(0, x), UDim(0, 0))); b->setSize(UVector2(UDim(0, 50), UDim(0, 25))); sp->addChildWindow(b); x += 50; }

Additional information:

Comments (1)

  1. Paul Turner reporter

    changeset: 3182:902e10eef5b3 tag: tip user: Paul Turner <> date: Thu Mar 01 11:20:39 2012 +0000 summary: FIX: Resolve some isses with scrollbars showing incorrectly and with the clipping area being out-of-sync.

  2. Log in to comment