[Mono-bugs] [Bug 336218] TextBox MaxLength = 0 behaving wrong
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Oct 24 13:19:49 EDT 2007
https://bugzilla.novell.com/show_bug.cgi?id=336218#c2
Gert Driesen <gert.driesen at pandora.be> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gert.driesen at pandora.be
--- Comment #2 from Gert Driesen <gert.driesen at pandora.be> 2007-10-24 11:19:49 MST ---
>From MSDN:
"For single line text box controls, if the MaxLength property is set to 0, the
maximum number of characters the user can enter is 2147483646 or an amount
based on available memory, whichever is smaller. For multiline text box
controls, the maximum number of characters the user can enter is 4294967295 or
an amount based on available memory, whichever is smaller."
When you set the MaxLength to 0, the MaxLength property itself actually just
returns 0. I assume it internally uses the limits mentioned above, but no I
haven't tested this :p
MS never seems to enforce the maximum number of characters. The Text property
or the AppendText method can always be used to assign/add text that exceeds
MaxLength.
But visually only the characters within the limits of the "internal" maximum
length are displayed.
We probably also need to add unit tests (or standalone tests) for this (except
for the "internal" limits, since these would cause OOM exception on most
systems anway, and take ages to complete on others).
PS. you should probably also use int.MaxValue and uint.MaxValue instead of
using "magic" numbers.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list