Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Borland Delphi > Re: Rich Edit a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3656 of 3888
Post > Topic >>

Re: Rich Edit and wordwrap

by "Maarten Wiltink" <maarten@[EMAIL PROTECTED] > Mar 26, 2008 at 10:49 AM

"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
 




 3 Posts in Topic:
Rich Edit and wordwrap
spannerj <spencer.jago  2008-03-26 00:46:33 
Re: Rich Edit and wordwrap
"Maarten Wiltink&quo  2008-03-26 10:49:31 
Re: Rich Edit and wordwrap
spannerj <spencer.jago  2008-03-27 12:14:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 28 5:36:33 CDT 2008.