What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » NewLine in TextBox

NewLine in TextBox
Author: Message:
cornetto
New Member
*


Posts: 8
35 / Male / –
Joined: Jul 2004
O.P. NewLine in TextBox
Hi :)

Well, i save an EditControl value in a XML file.
When i want to load it again in a EditControl, linebreaks don't appear.

What should i do ?

This post was edited on 07-07-2006 at 11:03 PM by cornetto.
[Image: french-flag.gif]
07-07-2006 11:01 PM
Profile E-Mail PM Find Quote Report
noroom
Full Member
***

Avatar
www.noroom.tk

Posts: 107
Reputation: 4
Joined: Sep 2003
RE: NewLine in TextBox
Replace the linebreaks with a special character, and then when loading the value, replace them back?
07-10-2006 08:44 PM
Profile E-Mail PM Find Quote Report
cornetto
New Member
*


Posts: 8
35 / Male / –
Joined: Jul 2004
O.P. RE: NewLine in TextBox
Yeah but what Special Char ?
It works with RichEditControl.

Thanks "me".....
[Image: french-flag.gif]
07-10-2006 08:46 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: NewLine in TextBox
XML files are textfiles using HTML tags (roughly speaking).

This means that you must apply to the same rules as for HTML files for storing text. This means that special characters (and even also some normal characters like ">") must be saved as entities when you need to store them inside the XML and convert the entities back when you read them.

For example, line breaks are not valid in XML. You can write all the line breaks you want, it wont be seen as text.

RichEditText can be stored "as-is" (almost!!! thus not entirly, you can/will encounter just the same problems, but with other characters and stuff) because with RichEditText those special characters are already converted to entities and special tags.

You will always need to use a converter if you whish to store data/text in XML and you have no control of what is being stored or you have no certainty that the text will be "safe".
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-11-2006 10:48 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On