Python Forum
Print func textbox instead of shell
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print func textbox instead of shell
#2
This seems to work:
>>> import tkinter as tk
>>> root = tk.Tk()
>>> in_text = tk.Text(root, height=20, width=30)
>>> in_text.pack()
>>> out_text = tk.Text(root, height=20, width=30)
>>> out_text.pack()
>>> def on_click():
...   value = in_text.get("0.0", tk.END)
...   out_text.insert("0.0", "you clicked!" + value * 2)
...
>>> tk.Button(root, height=1, width=10, text="Commit", command=on_click).pack()
Reply


Messages In This Thread
Print func textbox instead of shell - by zykbee - Oct-30-2017, 06:30 AM
RE: Print func textbox instead of shell - by nilamo - Dec-06-2017, 08:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I print from within actor(func) ?? Pedroski55 2 335 May-01-2024, 05:35 AM
Last Post: Pedroski55
  How to output one value per request of the CSV and print it in another func? Student44 3 1,468 Nov-11-2022, 10:45 PM
Last Post: snippsat
  Func Animation not displaying my live graph jotalo 0 1,629 Nov-13-2020, 10:56 PM
Last Post: jotalo
  Trying to write func("abcd") -> "abbcccdddd" omm 8 4,392 Oct-24-2020, 03:41 AM
Last Post: bowlofred
  Take particular symbol from textbox help samuelbachorik 3 2,242 Apr-14-2020, 03:55 AM
Last Post: steve_shambles
  call func from dict mcmxl22 3 2,999 Jun-21-2019, 05:20 AM
Last Post: snippsat
  About [from FILE import FUNC] Nwb 7 3,776 Apr-21-2019, 02:46 PM
Last Post: snippsat
  Executing func() from a different folder ebolisa 2 2,448 Jan-14-2019, 10:18 AM
Last Post: ebolisa
  Correct number wrong position func. albry 5 6,203 Jan-11-2019, 04:01 PM
Last Post: Larz60+
  How can I return my list from a func? Mike Ru 3 3,207 Oct-22-2018, 01:15 PM
Last Post: buran

Forum Jump:

User Panel Messages

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