Click to See Complete Forum and Search --> : Maxlength property of multiline textbox


gknierim
April 11th, 2003, 10:45 AM
Does anyone know why the maxlength property of the textbox is not used if the textmode is set to Multiline?

DSJ
April 11th, 2003, 10:58 AM
Mine is working fine... you talking Windows form or web form?

gknierim
April 11th, 2003, 12:12 PM
Both. According to MSDN help definition of Textbox.MaxLength Property:

Gets or sets the maximum number of characters allowed in the text box.

[Visual Basic]
Overridable Public Property MaxLength As Integer

Property Value
The maxumum number of characters allowed in the text box. The default is 0.


Remarks
This property is not applicable when the TextMode property is set to TextBoxMode.MultiLine.

Requirements
Platforms: Windows 2000, Windows XP Professional, Windows .NET Server family

So why does it work for you and not me? Are you sure yours works when set to MULTILINE textmode???

Greg

DSJ
April 11th, 2003, 12:57 PM
Yep, I set the textbox to multiline, the maxlength to 25 and all I can type in is 25 characters....

gknierim
April 11th, 2003, 01:36 PM
OK, apparently in Windows apps, the multiline property is a true false whereas a WEB application, there is no multiline property but a textmode property.

THEREFORE, this only applies to web applications. Now...back to my original question... ??

G :cool: