Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4133
MaxLength Property Lost On Unbound Textbox
posted

I have a textbox on my login form that is unbound.  I have set the MaxLength property to 20 characters in the designer.  However, whenever I run the app, the MaxLength property seems to get reset to zero.  I can tell this because I put a breakpoint in the Validating event and checked it.  This only seems to happen on unbound textboxes.  Bound textboxes seem to hold the property just fine.  If I set the property in code, it works fine.  Any idea why this would be happening?

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    When you say TextBox, do you mean UltraTextEditor? If you are using an actual TextBox, I'm afraid that's a little but outside the scope of these forums. You would probably be better off and get more helpful responses on a Microsoft  or other generl DotNet WinForms forum. Smile

    Either way, I can't see any reason why the MaxLength would get reset. I tested this out in a simple form and set the UltraTextEditor MaxLength to 20, then checked in the Validating event and it works fine for me.

    Can you duplicate this in a small sample project?

    What version of the control are you using?  

     

Children
No Data