Game Development Community

Problem

by Aygarp · in Technical Issues · 08/23/2006 (3:25 am) · 3 replies

Heyyy all, again a li'l doubt....i was trying -----reading a file and then writing the text contained in the text file on a gui. ....it worked but.....when i tried appending some more words( contained in the updated .txt file or a new .txt file)......ithe new set of words get overwritten on gui....they dont get added to the previous text, which is what i want....am not able to figure out how to do it...have tried guiTextCtrl, guiTextListCtrl....do i need to use some other guiCtrl???

#1
08/23/2006 (6:09 pm)
Aygarp,

How exactly are you adding the text to the Control in the first place?

If you simply Append the new Text to the old text with something like;

ctrl.setText(ctrl.getText() @ %newText);

It should work ...
#2
08/23/2006 (11:25 pm)
Heyyyy all
again a simple problem.....something realated to what aygarp asked...
in guiTextEditCtrl.....how can i write multi-lines......do i need to enable something....or is there any other gui-control???
#3
08/24/2006 (7:13 am)
PK, if I understand correctly, try doing this:

ctrl.setText("Line1\nLine2\nLine3);

The \n is replaced with a newline