StaticText VertScrollbar over Text
Posted: Fri Jul 08, 2011 08:32
like the thread said: http://www.cegui.org.uk/phpBB2/viewtopic.php?f=10&t=5213
Things go like this:
setText --> FalagardStaticText::onTextChanged --> configureScrollbars :
in configureScrollbars,
1. getDocumentSize() will call FormattedRenderedString::format(), under the old renderArea;
2. scrollbar visibility is updated;
3. new renderArea is calculated; if the new renderArea is smaller than old one, the renderedString will be clipped.
my quick fix is :
if the new renderArea differs with old one,
then add updateFormatting() after new renderArea is calculated;
Well, I'm not sure if this is the best solution but it seems to work for now
Things go like this:
setText --> FalagardStaticText::onTextChanged --> configureScrollbars :
in configureScrollbars,
1. getDocumentSize() will call FormattedRenderedString::format(), under the old renderArea;
2. scrollbar visibility is updated;
3. new renderArea is calculated; if the new renderArea is smaller than old one, the renderedString will be clipped.
my quick fix is :
if the new renderArea differs with old one,
then add updateFormatting() after new renderArea is calculated;
Well, I'm not sure if this is the best solution but it seems to work for now