Wordwrap -> Different ways to wrap ??
Wordwrap -> Different ways to wrap ??
Hi,
By default, RichViewEdit does do a wordwrap. It wraps whole words to the next line.
I would like to see the behaviour where a word is just cut in half (whenever the cursor reaches the end of the component's area) and typing continues at the next line.
(This is common behaviour for Microsoft's RichText)
Is there a way to get this behaviour with RichViewEdit?
I found the option "rvpaoNoWrap" but then the user can simply continue typing beyond the component's area.
Thanks for all replies,
Bonny
By default, RichViewEdit does do a wordwrap. It wraps whole words to the next line.
I would like to see the behaviour where a word is just cut in half (whenever the cursor reaches the end of the component's area) and typing continues at the next line.
(This is common behaviour for Microsoft's RichText)
Is there a way to get this behaviour with RichViewEdit?
I found the option "rvpaoNoWrap" but then the user can simply continue typing beyond the component's area.
Thanks for all replies,
Bonny
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
No.
For example I have a textbox which can only show 10 characters (in some given width). Then if I type "ABCD EFGHIJKLMNOP" then I want the text box to display:
ABCD EFGHI
JKLMNOP
So it doesnt wrap "EFGHIJKLMNOP" to next line, but simply stops at the end of the top line, and continues at 2nd line.
Would this be possible with TRichView?
Would this be "easy" to add to TRichView?
Regards,
Bonny Gijzen
For example I have a textbox which can only show 10 characters (in some given width). Then if I type "ABCD EFGHIJKLMNOP" then I want the text box to display:
ABCD EFGHI
JKLMNOP
So it doesnt wrap "EFGHIJKLMNOP" to next line, but simply stops at the end of the top line, and continues at 2nd line.
Would this be possible with TRichView?
Would this be "easy" to add to TRichView?
Regards,
Bonny Gijzen
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TRichView breaks words which are wider than the document width. But at first it attempts to break line on spaces.
In your example, it will break after ABCD, and then, if necessary, it will break inside EFGHIJKLMNOP.
As I understand, you want an option for breaking in arbitrary place. Can you explain when it may be needed?
In your example, it will break after ABCD, and then, if necessary, it will break inside EFGHIJKLMNOP.
As I understand, you want an option for breaking in arbitrary place. Can you explain when it may be needed?
Hi,
>In your example, it will break after ABCD, and then, if necessary, it will break inside EFGHIJKLMNOP
Correct, but I don't want it to break after ABCD.
I want it to break after "ABCD EFGHI".
In our software (currently using MS RichText) we would like the user to type and position the text as user sees fit, without any forced word-wrap whatsoever.
The software is used to control a LED display with same dimensions (width and height in characters).
So would such a wrap be possible within TRichView ?
Ideally, it would be a generic update to TRichView, so it has 3 kinds of wordwrap modes:
1) Wrap at some delimiter (like space or comma)
2) Wrap at end (right side) of edit box (this is what I need)
3) No wrap (just continue typing and Hscrollbar appears)
Rgs Bonny,,
>In your example, it will break after ABCD, and then, if necessary, it will break inside EFGHIJKLMNOP
Correct, but I don't want it to break after ABCD.
I want it to break after "ABCD EFGHI".
In our software (currently using MS RichText) we would like the user to type and position the text as user sees fit, without any forced word-wrap whatsoever.
The software is used to control a LED display with same dimensions (width and height in characters).
So would such a wrap be possible within TRichView ?
Ideally, it would be a generic update to TRichView, so it has 3 kinds of wordwrap modes:
1) Wrap at some delimiter (like space or comma)
2) Wrap at end (right side) of edit box (this is what I need)
3) No wrap (just continue typing and Hscrollbar appears)
Rgs Bonny,,
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Additional information:
I noticed there is an option called "MaxLength"
If I set that to value 13, then I can only type 13 characters and then it breaks to next line.
At first this looked very promising for my "no word break" request.
I simply calculate how many characters are visible, 13 in my case, so after 13 characters it simply breaks to new line. GREAT!
BUT, after more testing 2 issues arrised:
1) Still RichViewEdit does do word breaking when I type a space.
2) In Arabic language, there are some characters which are stored as 2 bytes (both in ascii as in unicode). So when typing that character I could only type it 6 times (and not 13!)
So this is not suitable for me. I must have a break procedure which uses the true right edge of the component (instead of counting chars).
This is just for your reference.
Regards and thanks so far,
Bonny
I noticed there is an option called "MaxLength"
If I set that to value 13, then I can only type 13 characters and then it breaks to next line.
At first this looked very promising for my "no word break" request.
I simply calculate how many characters are visible, 13 in my case, so after 13 characters it simply breaks to new line. GREAT!
BUT, after more testing 2 issues arrised:
1) Still RichViewEdit does do word breaking when I type a space.
2) In Arabic language, there are some characters which are stored as 2 bytes (both in ascii as in unicode). So when typing that character I could only type it 6 times (and not 13!)
So this is not suitable for me. I must have a break procedure which uses the true right edge of the component (instead of counting chars).
This is just for your reference.
Regards and thanks so far,
Bonny
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: