Page 1 of 1
StaticText Formatting incorrect.
Posted: Mon Aug 15, 2005 19:21
by rick
i setting StaticText fromat with the code
setFormatting(StaticText::HorzFormatting::WordWrapLeftAligned ,StaticText::VertFormatting::TopAligned);
but just working fine at Latin character string,can't auto wrap in chinese character string.
what warning?
Re: StaticText Formatting incorrect.
Posted: Mon Aug 15, 2005 19:44
by J_A_X
I don't think you have you go through HorzFormatting or VertFormatting for the format type. They just need it to be of HorzFormatting or VertFormatting type.
Try the following instead:
Code: Select all
setFormatting(StaticText::WordWrapLeftAligned ,StaticText::TopAligned);
If that doesn't work, show us more code and log file
Re: StaticText Formatting incorrect.
Posted: Mon Aug 15, 2005 21:25
by rick
Doesnot wroking.
there code working fine.
msgbox = (StaticText *) WindowManager::getSingleton().createWindow((utf8*)"WindowsLook/StaticText", (utf8*)"message_msgbox" ) ;
panel->addChildWindow(msgbox);
msgbox->setPosition(Point(0.1,0.1));
msgbox->setSize(Size(0.8,0.6));
msgbox->setFont(gfont);
msgbox->setFrameEnabled(false);
msgbox->setBackgroundEnabled(false);
msgbox->setFormatting(StaticText::WordWrapLeftAligned ,StaticText::TopAligned);
msgbox->setText((utf8*)"Crazy Eddie's GUI System is a free library providing windowing and widgets" ) ;
the result is
just change to
msgbox->setText((utf8*)"你说你是我的传说,让他天长地久,我不知道怎么说了~" ) ; //chinese character string
the result is incorrect,not auto wrap,just one line
why just working for latin character?
Re: StaticText Formatting incorrect.
Posted: Mon Aug 15, 2005 21:55
by lindquist
Are there any spaces in that string ?
Re: StaticText Formatting incorrect.
Posted: Tue Aug 16, 2005 14:10
by J_A_X
I think lind is right, i'm pretty sure you need a space to get wordwrap to work. (Though it would be a nice little thing to implement in CEGUI, no space wordwrap)
Re: StaticText Formatting incorrect.
Posted: Thu Aug 18, 2005 13:08
by CrazyEddie
We currently use some basic codes for whitespace (pretty much just: ' ', \n, \t). I have not gone into the specifics of this particular issue, though basically, until full unicode support is added there will be glitches like this.