Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:50:38+00:00 2026-06-10T09:50:38+00:00

Searching on google and I found that is impossible to using wx.TE_PROCESS_ENTER on masked

  • 0

Searching on google and I found that is impossible to using wx.TE_PROCESS_ENTER on masked TextCtrl, I try it myself to set style=wx.TE_PROCESS_ENTER then bind it with wx.EVT_TEXT_ENTER, but nothing happen. What I was trying to do is making many masked TextCtrl so user can input some value, then when enter button pressed a function called to do calculation on it.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:50:40+00:00Added an answer on June 10, 2026 at 9:50 am

    I’m not sure why that’s eating that event, but you can simulate the same thing by binding to EVT_KEY_DOWN instead. Here’s one example:

    import wx
    import wx.lib.masked as masked
    
    ########################################################################
    class MyPanel(wx.Panel):
        """"""
    
        #----------------------------------------------------------------------
        def __init__(self, parent):
            """Constructor"""
            wx.Panel.__init__(self, parent=parent)
    
            control = ["Phone No", "(###) ###-#### x:###", "", 'F^-', "^\(\d{3}\) \d{3}-\d{4}", '','','']
            maskText = masked.TextCtrl(self, 
                                       mask = control[1],
                                       excludeChars = control[2],
                                       formatcodes  = control[3],
                                       includeChars = "",
                                       validRegex   = control[4],
                                       validRange   = control[5],
                                       choices      = control[6],
                                       choiceRequired = True,
                                       defaultValue = control[7],
                                       demo         = True,
                                       name         = control[0],
                                       style=wx.TE_PROCESS_ENTER)
            maskText.Bind(wx.EVT_KEY_DOWN, self.onEnter)
    
        #----------------------------------------------------------------------
        def onEnter(self, event):
            """"""
            keycode = event.GetKeyCode()
            if keycode == wx.WXK_RETURN or keycode == wx.WXK_NUMPAD_ENTER: 
                print "you pressed ENTER!"
            event.Skip()
    
    ########################################################################
    class MyFrame(wx.Frame):
        """"""
    
        #----------------------------------------------------------------------
        def __init__(self):
            """Constructor"""
            wx.Frame.__init__(self, None, title="Masked!")
            panel = MyPanel(self)
            self.Show()
    
    if __name__ == "__main__":
        app = wx.App(False)
        frame = MyFrame()
        app.MainLoop()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Searching SO and Google, I've found that there are a few Java HTML parsers
After searching on Google, I found that people say it's only possible to connect
I was searching Google and found some code that implements a jQuery lazy load
I have been searching around using Google but I can't find an answer to
I've been searching Google to try and find if Apache Velocity can be used
When I was searching on Google I found a useful class which let us
I'm teaching myself some basic scraping and I've found that sometimes the URL's that
Got a problem that seems to be fairly endemic with IE8 (searching on Google)
I need to handle another windows application programatically, searching google I found a sample
I have been searching Google for that last 15 minutes trying to find Documentation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.