Re: Rich Edit and wordwrap
- From: spannerj <spencer.jago@xxxxxxxxx>
- Date: Thu, 27 Mar 2008 12:14:14 -0700 (PDT)
On Mar 26, 9:49 am, "Maarten Wiltink" <maar...@xxxxxxxxxxxxxxxxxx>
wrote:
"spannerj" <spencer.j...@xxxxxxxxx> wrote in message
news:645f0f28-270b-4e67-80ff-6807a752e5e0@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
Cheers for taking the time to reply.
The initial text that is entered needs to be wrapped for ease of entry
by the user. When it is displayed in various other applications the
display can vary in width so I need the carriage return markers.
I decided to write a routine to format the text before saving to the
database.
Cheers for your help.
.
- References:
- Rich Edit and wordwrap
- From: spannerj
- Re: Rich Edit and wordwrap
- From: Maarten Wiltink
- Rich Edit and wordwrap
- Prev by Date: Re: Scanline Enigma
- Next by Date: Re: D2006 Object inspector component
- Previous by thread: Re: Rich Edit and wordwrap
- Next by thread: Feature Request: Propertie(s) to specify the thread stack space !
- Index(es):
Relevant Pages
|