We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

MaskedEditBox: how to get rid of prompt characters completely

Thread ID:





3502 Mar 25,2003 07:03 PM Mar 26,2003 01:53 PM Windows Forms 1
Tags: Tools
Hugues Valois
Asked On March 25, 2003 07:03 PM

Hello, I've been trying to use the MaskedEditBox to input C++ type names. This means only alphanumeric characters are allowed, as well as the '_' . Question #1. I'm not sure how to allow the '_' at the same time as alphanumeric. Question #2. I am not interested in seeing prompt characters at all, the thing is when I tab to that control, or double-click the control, I can see spaces that fill out the mask (if mask is of length 32, and the user entered a string of length 16, we can see the 16 remaining spaces). Is there anything that can be done to fix both of these problems? thanks, hugues

Davis Jebaraj [Syncfusion]
Replied On March 26, 2003 01:53 PM

Hi, 1. To allow the _ character in addition to the alphanumeric characters you can handle the MaskCustomValidate event and specify this behavior by just setting the event argument's Handled and Accepted properties. Please see the attached sample. 2. To have no PromptCharacter : Set the PromptCharacter, PassivePromptCharacter and PaddingCharacter to be the null character(In code you can set the PromptCharacterInt, PassivePromptCharacterInt and PaddingCharacterInt to be 0) Please see the attached sample for this behavior also. Please let us know if you have any further questions. Regards, Davis


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.