BUG: The ClientSize property of the TextBox control incorrectly includes the size of the borders if the BorderStyle property is set to BorderStyle.FixedSingle (814351)
The information in this article applies to:
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio 2005 Express Edition
SYMPTOMSThe ClientSize property either receives or sets the height and the width of the
control client area. The client area is the periphery of the control. The
client area does not include non-client elements such as scroll bars, borders,
title bars, and menus. If the BorderStyle property of the TextBox control is set to BorderStyle.FixedSingle, the ClientSize property of the TextBox control incorrectly includes the size of
the borders.WORKAROUNDTo work around this problem use one of the following
methods: - Deduct the size of the TextBox control borders. TextBox
returns the ClientSize property when the BorderStyle property of the TextBox control is set to
BorderStyle.FixedSingle. The border size of a control depends
on the display settings of your computer.
- Use the RichTextBox control instead of TextBox
control.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 1/21/2006 |
---|
Keywords: | kbvs2005applies kbvs2005swept kbvs2002sp1sweep kbWindowsForms kbControl kbCtrl kbbug KB814351 kbAudDeveloper |
---|
|