John Smith
John Smith

Reputation: 428

wxPython: Find the focused wxTextCtrl?

I am new to wxPython and trying out some examples. I am using wxFormBuilder to create a simple GUI with many wxTextCtrl. I want to determine the current location of cursor, which is in one of those wxTextCtrl and do some operation. How do I do this? Please help!

Upvotes: 0

Views: 495

Answers (1)

Mike Driscoll
Mike Driscoll

Reputation: 33071

Try using the wx.Frame's FindFocus() method. That should return the widget that has focus.

See also:

Upvotes: 1

Related Questions