Python Forum
how to bind entry to a function in another file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to bind entry to a function in another file
#1
so i have an entry box when i enter something into it and press enter it will print the value. when the function which i am binding into is in same python file then it is working but how i can bind entry_box to function in another file . i tried it but it doesn't seem to work. here is my code
1
2
3
4
5
6
7
8
9
from tkinter import *
import two
 
root = Tk()
entry_var = StringVar()
entry_box = Entry(root)
entry_box.bind("<Return>",lambda entry_var:two.function)
entry_box.pack()
root.mainloop()
Reply
#2
what does the module two contain?
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] bind menator01 1 1,954 Apr-15-2022, 08:47 PM
Last Post: menator01
  How to move in entries using the arrow keys by applying the bind and focus? pymn 4 9,711 Apr-06-2022, 04:29 AM
Last Post: pymn
  [Tkinter] compare entry with value inside file rwahdan 1 2,796 Jun-19-2021, 08:01 AM
Last Post: Yoriz
  [Tkinter] bind lambda keypress counter knoxvilles_joker 15 11,438 Apr-19-2021, 01:56 AM
Last Post: knoxvilles_joker
  [Tkinter] Mouse click without use bind ATARI_LIVE 8 12,163 Oct-23-2020, 10:41 PM
Last Post: ATARI_LIVE
  [Tkinter] Unable to get current contents of the entry field where the content is the file path pmpinaki 1 2,818 Apr-18-2020, 06:45 PM
Last Post: deanhystad
  [Kivy] AttributeError: 'NoneType' object has no attribute 'bind' faszination_92 2 7,703 Apr-12-2020, 07:01 PM
Last Post: Larz60+
  [WxPython] Bind error PeterLinux 1 3,082 Apr-06-2020, 03:07 AM
Last Post: joe_momma
  Tkinter:Unable to bind and unbind function with a button shallanq 2 6,213 Mar-28-2020, 02:05 AM
Last Post: joe_momma
  Transfer Toplevel window entry to root window entry with TKinter HBH 0 5,311 Jan-23-2020, 09:00 PM
Last Post: HBH

Forum Jump:

User Panel Messages

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