View Full Version : wxPython question

February 26th, 2012, 07:53 PM
Hi guys,

I am making GUI with wxPython and I wanna make something like prompt.
I have TextCtrl and I want to type commands into it and after pressing Enter execute it. I cant find way how to process text with pressing Enter.

Can somebody help me with this problem ?
Thank you

February 28th, 2012, 10:39 PM
You have to pass the wx.TE_PROCESS_ENTER flag to the text control when you create it.
Then you can bind the event wx.EVT_TEXT_ENTER to a function and do everything you need from there.

C++ documentation at:

There is wxPython documentation, but it is usually less detailed.