Problems with borders

General TRichView support forum. Please post your questions here
Post Reply
alogrep
Posts: 52
Joined: Fri Oct 27, 2006 5:25 pm

Problems with borders

Post by alogrep »

Hi.

If i have a word ABC, I highlight it, then insert borders (with all BorderOffests=0) around it, the border will alsways go from the left margin to the right margine of the richview control (regardles of where on the line i put ABC). If I change BorderOffsetts.right to -100, the right border margin comes (100 pixels??) shorter then the richview right margin. -200, shorter, -600, it comes close to the end of ABC. In other words, it seems that what is expalined in the online manual for BorderOffsets works BUT with respect to the width of the richview control, not the width of the word selected. Am I doing something wrong? No doubt. Moreover, if i have 3 lines
ABC
123
DEF
highlight them all and insert a border around them, richview draws 3 borders, 1 around each line . Is it possible to draw a border aound the selected paragraph?
Thanks for any help.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This is a paragraph border, not a text border. It really depends on the control width. Left and right paragraph borders are counted from margins.
Some properties may affect to the distance from the right side (MinTextWidth, MaxTextWidth, rvoClientTexWidth in Options). See the help file, "Scrolling in RichView" topic, chapter "Horizontal scrolling"

Border around text is not supported directly. You can implement it yourself in OnDrawStyleText event, but there is a problem with jutify alignment: in paragraphs with this alignment, this event will be called for each word separately.
Post Reply