1

I'm looking for a way to show the text that the user is typing in a label or a readonly textctrl but without pushing a button. Is this possible?

EDIT: Using wxpython

VeVi
  • 281
  • 2
  • 7
  • 17
  • Welcome to SO. Please read [What topics can I ask about](http://stackoverflow.com/help/on-topic) and [How to ask a good question](http://stackoverflow.com/help/how-to-ask) And the perfect question And how to create a [Minimal, Complete and Verifiable example](http://stackoverflow.com/help/mcve) SO is not a free Coding or Code Conversion or Debugging or Tutorial or Library Finding service Here at SO we fix your attempts, we do not code things for you – Mingebag Dec 20 '16 at 12:18
  • thank you, but I am not looking for someone who does my coding. I was just asking if someone know a command for this problem. – VeVi Dec 20 '16 at 12:20
  • Well then another question what have you tried why dont you share with us your trail and error "story" ? – Mingebag Dec 20 '16 at 12:22
  • Here's the answer: http://stackoverflow.com/questions/6548837/how-do-i-get-an-event-callback-when-a-tkinter-entry-widget-is-modified – Fejs Dec 20 '16 at 12:27
  • Thank you fejs, but what I failed to mention was that i'm using wxpython instead of tkinter. – VeVi Dec 20 '16 at 13:15

1 Answers1

1

I found the answer.

One can use wx.EVT_TEXT

self.txtNameNewMA = wx.TextCtrl(self.panel, wx.ID_ANY)
self.lblNameNewMAPreview = wx.StaticText(self.panel, label="")

self.bind(wx.EVT_TEXT, self.onmessage)
def onmessage(self, message)
   self.lblNameNewMAPreview.SetLabel(self.txtNameNewMA.GetValue())
VeVi
  • 281
  • 2
  • 7
  • 17