"spannerj" <spencer.jago@[EMAIL PROTECTED]
> wrote in message
news:645f0f28-270b-4e67-80ff-6807a752e5e0@[EMAIL PROTECTED]
> I have a rich edit box that I have limited in size to allow a user to
> enter 80 character lines. They can start a new line at any time but if
> they continue typing the word wrap kicks in at the 80 character point.
>
> My problem is that the text they type is saved to the DB2 database
> with RTF tags. When a user hits return a tag is added to the text and
> stored on the database. When the component performs the word wrap I am
> left with nothing but a space on the database. When this text is
> loaded in the Rich Edit of a different application it does not format
> correctly as it does not know to start a new line where the wrap was.
>
> Could someone tell me how I can still give the user word wrap
> functionality but also detect that I should have a tag where word wrap
> has taken place?
Take a step back and ask yourself what the point of wordwrapping is.
From where I'm standing, it's to prevent horizontal scrollbars on
whatever editbox happens to be displaying the text, depending on the
width of the editbox, not the text itself.
So the space seems exactly right. A single paragraph will become a
single line and be wrapped appropriately by the next editbox, depending
on _its_ width.
If that's not what you want, have the wrapping code insert a paragraph
mark, because apparently that's what you mean. If you don't have an
event to catch (in some shape or form; it may be a window message),
preprocess the text before storing it in the database. Not an easy task,
though. RTF gets ugly.
Groetjes,
Maarten Wiltink


|