CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2000
    Posts
    264

    Maxlength property of multiline textbox

    Does anyone know why the maxlength property of the textbox is not used if the textmode is set to Multiline?

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Mine is working fine... you talking Windows form or web form?

  3. #3
    Join Date
    Jan 2000
    Posts
    264
    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

  4. #4
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    Yep, I set the textbox to multiline, the maxlength to 25 and all I can type in is 25 characters....

  5. #5
    Join Date
    Jan 2000
    Posts
    264
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured