if we define a mask in the MaskedEditBox the user input is no problem. But how can we reset a user input that the mask will work again.
The user puts in:
If the user reenters the form (anytime) and we prefill the Text-Property then there is:
Did we have to parse every Box for cutting and pasting the user input correctly? That would be much work to do so for every different kind of Mask... ?
Thank you for helping out
GPGurucharan Patwal Syncfusion Team December 4, 2003 07:31 AM
Yes, I see this problem. The workaround for the time being would be to parse the Mask of each MaskedEditBox and trim the Text property value appropriately. I have attached a sample application that illustrates this workaround : Sample_Application
The Mask used in this sample is PF:&&&&&. I have informed the Essential Tools development team regarding this issue and will update with their inputs on this one. We appreciate your feedback, and thanks for your patience.
GPGurucharan Patwal Syncfusion Team December 4, 2003 09:12 AM
A better workaround for this problem would be to use the ClipText property of the MaskedEditBox to save the old text value. The reason being - MaskedEditBox only applies text set through the Text property to the Mask positions and not the literal positions. If you change the sample to set the ClipMode to ExcludeLiterals or change this line to
this.oldvalue = this.maskedEditBox1.ClipText;
it would work as expected. I have attached the modified version of my earlier sample application here : Sample_Application_Modified
Please try this and let me know if it helps.
RHRalf HuettlDecember 4, 2003 11:26 AM
this is a nice workaround but if we allow prompt input (or in our case input of spaces) then the spaces are deleted because this is a literat (ExcludeLiteral).
The second problem is if the mask is more complex
these workaround is not working.
We must parse every input manually then it works for us. But there hast to be be a formatText to save the user input with the mask correctly. It is not hard to develop (maybe with xml or regular expression grammar)
GPGurucharan Patwal Syncfusion Team December 4, 2003 03:52 PM
Thanks for your feedback. The maskedEditBox1.ClipText workaround works fine even for complex masks like PF:&&&&:&&&&:&&&&&, but it does not handle blank spaces well. I will further investigate this issue and update you at the earliest. Thanks for your patience.
GPGurucharan Patwal Syncfusion Team December 5, 2003 03:31 PM
To handle empty spaces within the text in the MaskedEditBox, the PaddingCharacter property has to be set to a single space character - '' ''. However, there was a bug in the ClipText property that did not return empty mask positions filled with the PaddingCharacter. This has now been taken care of in the source code internally, and the bug fix is expected to be included in the next build of Essential Suite. Thanks for your cooperation, and we appreciate your feedback on this issue.