wrong text position in RichTextBox 
Author Message
 wrong text position in RichTextBox

Hi there,
in a C# application I have to load  RTF-files that contain text fields into
a RichTextBox with the LoadFile() method. My problem: the text in the fields
is not correctly displayed after loading, it sticks either on the right or
on the left side of the box.
Wrong properties settings?

Thanx a lot for any help

Uwe



Mon, 06 Jun 2005 16:03:16 GMT  
 wrong text position in RichTextBox
Uwe, do you mean it is right or left justified?  If that's what you mean
then you are going to have to use spaces and other formatting to ensure that
your text is lined up.  You also probably want to make sure you are using a
evenly spaced font like Courier New.

--
Greg Ewing [MVP]
http://www.claritycon.com/


Quote:
> Hi there,
> in a C# application I have to load  RTF-files that contain text fields
> into
> a RichTextBox with the LoadFile() method. My problem: the text in the
> fields
> is not correctly displayed after loading, it sticks either on the right or
> on the left side of the box.
> Wrong properties settings?

> Thanx a lot for any help

> Uwe



Mon, 06 Jun 2005 21:20:56 GMT  
 wrong text position in RichTextBox
Hi Greg,

thank you for responding.
Unfortunately this is not what I ment. What I'm having
problems with is the positioning of what was originally a text FIELD, for
example the address block of a letter. The fields itself seem not to be
existent anymore in the RichTextBox after loading the rtf file and their
formerly content now sticks on either side of the box. Opening the same file
with MS word works as expected. So I  think this phenomen has more to do
with the way the RichTextBox is interpreting the rtf file than with aligning
of characters. Anyway, thank you for your assistance.

greetings

Uwe



Quote:
> Uwe, do you mean it is right or left justified?  If that's what you mean
> then you are going to have to use spaces and other formatting to ensure
that
> your text is lined up.  You also probably want to make sure you are using
a
> evenly spaced font like Courier New.

> --
> Greg Ewing [MVP]
> http://www.claritycon.com/



> > Hi there,
> > in a C# application I have to load  RTF-files that contain text fields
> > into
> > a RichTextBox with the LoadFile() method. My problem: the text in the
> > fields
> > is not correctly displayed after loading, it sticks either on the right
or
> > on the left side of the box.
> > Wrong properties settings?

> > Thanx a lot for any help

> > Uwe



Tue, 07 Jun 2005 00:33:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. RichTextBox Scrollbar Position ?

2. What's wrong with RichTextBox ?

3. RichTextBox Text Formating

4. Center text in a RichTextBox

5. Pasting into RichTextBox - formatting taxt pasted as text!

6. RichTextBox set text to bold/color

7. Appending RTF formatted text to a RichTextBox?

8. Tree node with RichTextBox as its Text member

9. Question on RichTextBox Control...Rtf or Text??

10. RichTextBox - clearing text

11. How to scroll text in the RichTextBox from code

12. escape sequence to add color text to richtextbox

 

 
Powered by phpBB® Forum Software