wordwrap problem

planB

10-10-2010 03:03:02

hi, there!

in my app, there are two edit for chat, one is to edit the player's message, and the other is to list all the history message.
but i met the problem about wordwrap.

i have set the edit wordwrap to true,

edit_chat->setEditMultiLine(true);
edit_chat->setEditWordWrap(true);
list_chat->setEditWordWrap(true);


if edit more words, the words will stetch to right of the edit, but not wordwrap.

my.name

11-10-2010 12:22:48

list_chat->setEditMultiLine(true);


and show me skins

planB

12-10-2010 00:27:33

tks for the reply!

in fact, that have set in the skin, and this situation occur in the two edits. my skin is below,

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Window" skin="WindowC" position="41 39 264 392" layer="Overlapped" name="Chat">
<Property key="Widget_Caption" value="chatwindow"/>
<Property key="Window_MinSize" value="200 100"/>
<Widget type="Widget" skin="PanelSmall" position="4 4 249 249" align="Stretch">
<Widget type="Edit" skin="WordWrap" position="1 3 244 240" align="Stretch" name="list_chat">
<Property key="Edit_ReadOnly" value="true"/>
<Property key="Edit_MultiLine" value="true"/>
<Property key="Edit_WordWrap" value="true"/>
</Widget>
</Widget>
<Widget type="Widget" skin="PanelSmall" position="4 256 249 64">
<Widget type="Edit" skin="WordWrap" position="4 5 240 50" name="edit_chat"/>
</Widget>
<Widget type="Button" skin="Button" position="168 320 76 32" name="okbtn">
<Property key="Widget_Caption" value="OK"/>
</Widget>
</Widget>
</MyGUI>

my.name

12-10-2010 09:58:29

try "Edit" skin and property WordWrap and MultiLine

planB

13-10-2010 13:30:56

i have change the two edit's skin to Edit, but nothing have changed.

no matter input english word directly or input from a IME, the word will stretch to the right while the cursor have reached the right edge of the edit.

edit_chat->setEditMultiLine(true);
edit_chat->setEditWordWrap(true);
list_chat->setEditWordWrap(true);
list_chat->setEditMultiLine(true);

planB

17-10-2010 14:58:22

no other reply?

is it a debug of edit wighet or a mistake made by me?

tks!

my.name

18-10-2010 09:48:11

look at demo Demo_Console.

planB

19-10-2010 00:46:44

look at demo Demo_Console.

yes, i have checed that demo. it's list_history edit skin is like below,

<Widget type="Widget" skin="PanelSmall" position="4 4 401 245" align="Stretch">
<Widget type="Edit" skin="WordWrap" position="4 3 392 237" align="Stretch" name="list_History">
<Property key="Edit_ReadOnly" value="true"/>
</Widget>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="5 254 305 26" align="HStretch Bottom" name="combo_Command"/>
<Widget type="Button" skin="Button" position="313 254 91 26" align="Right Bottom" name="button_Submit">
<Property key="Widget_Caption" value="Submit"/>
Widget>
</Widget>


and it can't wordwarp also, if type more words in the combox and submit, the words will stretch to the right edge of the list_history edit.

Altren

19-10-2010 00:59:29

I tried layout you posted few days ago with MyGUI 3.0.2 and with latest revision from trunk. In both cases it works fine:

planB

19-10-2010 04:58:52

tks, i'm using 3.0.1 at the moment, i'll try the new version.