Home All Groups Group Topic Archive Search About

Alignment problem displaying .txt file in window's textbox?

Author
17 Jan 2006 4:21 PM
Nina
Hi everyone,

I try to a display a .txt file in window's textbox or rich textbox.  The
text file has contents line by line aligned perfectly when using NotePad to
view and print it. But when I display this .txt file in textbox or rich
textbox the alignment all messed up.  Please help me to solve this problem.

Thanks in advance.

Nina

Author
17 Jan 2006 4:39 PM
Kerry Moorman
Nina,

Be sure you are using a fixed-pitch font like Courier-New and not a
proportional font for the textbox or rich textbox.

Also be sure the textbox is wide enough to display an entire line without
wordwrapping.

Kerry Moorman


Show quoteHide quote
"Nina" wrote:

> Hi everyone,
>
> I try to a display a .txt file in window's textbox or rich textbox.  The
> text file has contents line by line aligned perfectly when using NotePad to
> view and print it. But when I display this .txt file in textbox or rich
> textbox the alignment all messed up.  Please help me to solve this problem.
>
> Thanks in advance.
>
> Nina
Author
17 Jan 2006 4:40 PM
Larry Lard
Nina wrote:
> Hi everyone,
>
> I try to a display a .txt file in window's textbox or rich textbox.  The
> text file has contents line by line aligned perfectly when using NotePad to
> view and print it. But when I display this .txt file in textbox or rich
> textbox the alignment all messed up.  Please help me to solve this problem.

Set the font of the textbox to Courier New (or some other fixed-width
font, eg Lucida Console).

--
Larry Lard
Replies to group please
Author
17 Jan 2006 4:42 PM
George Hardy
change the textbox font to something that is monospaced.  Courier New is a
truetype font that has the same width for a "I" as a "W".  If you use a font
like Arial, then the "I" will be much narrower, and your text alignment is
off.

hth
gh


Show quoteHide quote
"Nina" <N***@discussions.microsoft.com> wrote in message
news:E47ACBF2-8DB2-48CE-95D0-626944650473@microsoft.com...
> Hi everyone,
>
> I try to a display a .txt file in window's textbox or rich textbox.  The
> text file has contents line by line aligned perfectly when using NotePad
> to
> view and print it. But when I display this .txt file in textbox or rich
> textbox the alignment all messed up.  Please help me to solve this
> problem.
>
> Thanks in advance.
>
> Nina
Author
17 Jan 2006 5:30 PM
Nina
Thank you so much to all of you.  It displays perfectly now.

Thanks again.

Nina

Show quoteHide quote
"George Hardy" wrote:

> change the textbox font to something that is monospaced.  Courier New is a
> truetype font that has the same width for a "I" as a "W".  If you use a font
> like Arial, then the "I" will be much narrower, and your text alignment is
> off.
>
> hth
> gh
>
>
> "Nina" <N***@discussions.microsoft.com> wrote in message
> news:E47ACBF2-8DB2-48CE-95D0-626944650473@microsoft.com...
> > Hi everyone,
> >
> > I try to a display a .txt file in window's textbox or rich textbox.  The
> > text file has contents line by line aligned perfectly when using NotePad
> > to
> > view and print it. But when I display this .txt file in textbox or rich
> > textbox the alignment all messed up.  Please help me to solve this
> > problem.
> >
> > Thanks in advance.
> >
> > Nina
>
>
>