Re: Rich Edit and wordwrap



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.
.



Relevant Pages

  • Re: Rich Edit and wordwrap
    ... 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 ... width of the editbox, not the text itself. ...
    (alt.comp.lang.borland-delphi)
  • word wrapping with white spaces
    ... i hv made a table and it gets data from my database, ... wrapping so that table column remain in fixed size. ... want uses to see whole of the data in tooltip. ... explorer,another said its not possible to include spaces and word wrap ...
    (alt.html)
  • Re: Euro sign not displayed properly when fetched from DB
    ... The database must have been built with a character set that allows for the ... The client must be capable of displaying the character. ...
    (comp.databases.oracle.server)
  • Re: Line length set by number of characters
    ... > Make sure you are using a monospaced font like Courier, ... > character occupies the same width, and so 50 characters will always occupy ... The system does not spell check or word wrap. ... > Daiya Mitchell, MVP Mac/Word ...
    (microsoft.public.word.pagelayout)
  • Rich Edit and wordwrap
    ... I have a rich edit box that I have limited in size to allow a user to ... they continue typing the word wrap kicks in at the 80 character point. ... functionality but also detect that I should have a tag where word wrap ...
    (alt.comp.lang.borland-delphi)