v
Not logged inv
SearchAsk a QuestionReport an IssueMake a SuggestionMy Questions and Issues
Issue Details
Find By ID

How to set the TextEdit EditMask to reject the single quote character

Issue Details

Log in to Track Changes or Edit
Q207743
Question
Michael Benowitz
Yes
Processed
Answered
.NET
XtraEditors Library
8.3.2
Windows XP
Microsoft Visual Studio 2005
6/3/2009 12:40:21 PM
-> Created by Michael Benowitz 6/1/2009 8:03:57 PM

What would I use as an EditMask to allow all characters , except the ', that is the single quote character?
.

<- Processed (Answered) by DevExpress Team 6/1/2009 9:17:15 PM

Hello Mike,

The easiest way to achieve this goal is to handle the KeyPress event as shown below:

[VB.NET]

Private Sub TextEdit1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
Handles TextEdit1.KeyPress
    e.Handled = e.KeyChar = "'"c
End Sub

Please try this solution and inform us of your results.

Thanks,
Stan.

<- Processed (Customer Closed) by Michael Benowitz 6/3/2009 12:40:21 PM

Thank you. That works correctly.

Log in to Track Changes or Edit

Peer-to-Peer Discussion in DevExpress Forums

No discussion on this article has been started yet.

Please login to start discussion.

v
v
Search
Searching Tips