Python Forum
[WxPython] bind label and entry text with return key
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] bind label and entry text with return key
#2
i think i figured it out.

apparently you have to have wx.TE_PROCESS_ENTER as a style for the textctrl
        self.entry = wx.TextCtrl(self,-1,value=u"Enter text here.", style=wx.TE_PROCESS_ENTER)
        sizer.Add(self.entry,(0,0),(1,1),wx.EXPAND)
        self.Bind(wx.EVT_TEXT_ENTER, self.OnPressEnter, self.entry)
Recommended Tutorials:
Reply


Messages In This Thread
RE: bind label and entry text with return key - by metulburr - Aug-14-2018, 10:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] The Text in the Label widget Tkinter cuts off the Long text in the view malmustafa 4 4,856 Jun-26-2022, 06:26 PM
Last Post: menator01
  [Tkinter] bind menator01 1 1,249 Apr-15-2022, 08:47 PM
Last Post: menator01
  [Tkinter] bind lambda keypress counter knoxvilles_joker 15 7,763 Apr-19-2021, 01:56 AM
Last Post: knoxvilles_joker
  update text variable on label with keypress knoxvilles_joker 3 4,903 Apr-17-2021, 11:21 PM
Last Post: knoxvilles_joker
  How to read text in kivy textinput or Label jadel440 1 5,242 Dec-29-2020, 10:47 AM
Last Post: joe_momma
  [Tkinter] Mouse click without use bind ATARI_LIVE 8 7,437 Oct-23-2020, 10:41 PM
Last Post: ATARI_LIVE
  Get selected text inside an Entry Jerdup 0 2,473 Aug-20-2020, 12:42 PM
Last Post: Jerdup
  [Tkinter] Get the last entry in my text widget Pedroski55 3 6,395 Jul-13-2020, 10:34 PM
Last Post: Pedroski55
  [Tkinter] Get text entry in frame1, echo it in frame2 Pedroski55 8 3,941 Jul-10-2020, 11:51 PM
Last Post: Pedroski55
  [Kivy] Kivy text label won't shows up! AVD_01 1 2,931 Jun-21-2020, 04:01 PM
Last Post: AVD_01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020