[BUG] MultiLineEditbox::formatText()

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

[BUG] MultiLineEditbox::formatText()

Postby Jamarr » Mon Jun 09, 2008 19:58

Hey,

I'm surprised this hasn't already been posted, but there is a little bug when calling MultiLineEditbox::setText() with a string that exceeds the visible area. When this case occures, the vertical scrollbar is correctly shown, however the word-wrapping is not recalculated to account for the scrollbar being shown. This in turn causes the horizontal scrollbar to display, which is quite ugly :)

I briefly looked at Window::setText(), which calls MultiLineEditbox::onTextChanged(), which calls MultiLineEditbox::formatText(). I would suggest updating the formatText() function such that after determining the portion of text that fits within the visible area, if there is any remaining text it auto-enables the vertical scrollbar and then re-calculates (calls itself?) the word-wrapping this time taking into account the width of the vertical scrollbar.

For now I've been able to work around it by forcing the vertical scrollbar to be shown before calling setText(), but this isn't really an ideal solution. Ex:

Code: Select all

_pMebox->setShowVertScrollbar(True);
_pMebox->setText(CEGUI::String(cInfo.Text()));
_pMebox->setShowVertScrollbar(False);

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

Postby CrazyEddie » Tue Jun 10, 2008 08:32

Hi,

Thanks for the report. Somebody will investigate :)

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests