RichTextBox Properties Misbehaving
Messages   Related Types
This message was discovered on ASPFriends.com 'winforms-cs' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Dan Hurwitz (VIP)
Hi All,
=20
I am working with the RichTextBox control on a project, and some of its
properties don't seem to have the desired effect. These problems occur
in both VB & C#. =20
=20
In the following code, the horizontal scrollbar does not appear, even
though the ScrollBars property is set to ForcedBoth, and the
AutoWordSelection does not seem to have any effect whatsoever.
=20
Am I missing something or are these known problems.
=20
Thanks.
=20
--d
=20
=20
public RichTextBoxes()
{
Text =3D "RichTextBox";
Size =3D new Size(400, 500);
RichTextBox rtxt =3D new RichTextBox();
rtxt.Parent =3D this;
rtxt.Rtf =3D "{\\rtf1\\pard Some RTF text.}";
rtxt.Multiline =3D true;
rtxt.BorderStyle =3D BorderStyle.Fixed3D;
rtxt.ScrollBars =3D RichTextBoxScrollBars.ForcedBoth; // horizontal
doesn't appear
rtxt.Dock =3D DockStyle.Fill;
rtxt.AutoWordSelection =3D true; // does not seem to have any effect
}=20

=20

-------------------------------------------------------------------
Dan Hurwitz voice: 781-275-3375
Sterling Solutions fax: 781-275-3846
3 Liljegren Way Click here to reveal e-mail address
<mailto:Click here to reveal e-mail address> =20
Bedford, MA 01730 www.stersol.com
<http://www.stersol.com/> =20

Co-author with Jesse Liberty: Programming ASP.NET
<http://www.oreilly.com/catalog/progaspdotnet/> (O'Reilly)
------------------------------------------------------------------ =20
=20

Reply to this message...
 
    
Stephen Rees
Dan ...

richTextBox1.WordWrap = false;

Steve.

-----Original Message-----
From: Dan Hurwitz [mailto:Click here to reveal e-mail address]
Sent: 08 July 2002 21:07
To: winforms-cs
Subject: [winforms-cs] RichTextBox Properties Misbehaving

Hi All,

I am working with the RichTextBox control on a project, and some of its
properties don't seem to have the desired effect. These problems occur
in both VB & C#.

In the following code, the horizontal scrollbar does not appear, even
though the ScrollBars property is set to ForcedBoth, and the
AutoWordSelection does not seem to have any effect whatsoever.

Am I missing something or are these known problems.

Thanks.

--d

public RichTextBoxes()
{
Text = "RichTextBox";
Size = new Size(400, 500);
RichTextBox rtxt = new RichTextBox();
rtxt.Parent = this;
rtxt.Rtf = "{\\rtf1\\pard Some RTF text.}";
rtxt.Multiline = true;
rtxt.BorderStyle = BorderStyle.Fixed3D;
rtxt.ScrollBars = RichTextBoxScrollBars.ForcedBoth; // horizontal
doesn't appear
rtxt.Dock = DockStyle.Fill;
rtxt.AutoWordSelection = true; // does not seem to have any effect
}

-------------------------------------------------------------------
Dan Hurwitz voice: 781-275-3375
Sterling Solutions fax: 781-275-3846
3 Liljegren Way Click here to reveal e-mail address
<mailto:Click here to reveal e-mail address>
Bedford, MA 01730 www.stersol.com
<http://www.stersol.com/>

Co-author with Jesse Liberty: Programming ASP.NET
<http://www.oreilly.com/catalog/progaspdotnet/> (O'Reilly)
------------------------------------------------------------------

| [winforms-cs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/winforms-cs.asp = JOIN/QUIT

Reply to this message...
 
    
Dan Hurwitz (VIP)
Thanks, that did the trick

-------------------------------------------------------------------
Dan Hurwitz voice: 781-275-3375
Sterling Solutions fax: 781-275-3846
3 Liljegren Way Click here to reveal e-mail address
<mailto:Click here to reveal e-mail address> =20
Bedford, MA 01730 www.stersol.com <http://www.stersol.com>

Co-author with Jesse Liberty: Programming ASP.NET
<http://www.oreilly.com/catalog/progaspdotnet/> (O'Reilly)
------------------------------------------------------------------ =20

[Original message clipped]

Reply to this message...
 
 
System.Drawing.Size
System.Windows.Forms.BorderStyle
System.Windows.Forms.DockStyle
System.Windows.Forms.RichTextBox
System.Windows.Forms.RichTextBoxScrollBars
System.Windows.Forms.ScrollBars




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com