Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [Tkinter] command button automaticaly fired
#1
Hi all,

I create a form and a button with no command.

I create a class that inherit the constructor and add

self.launch_btn.configure(command=self.launch_exam())
But when I run the form, the button fired without cliking on it.

Any ideas plz ?
Quote
#2
Get rid of the parenthesis that executes it
self.launch_btn.configure(command=self.launch_exam)
Quote
#3
(Jun-16-2019, 06:16 PM)metulburr Wrote: Get rid of the parenthesis that executes it
self.launch_btn.configure(command=self.launch_exam)

Thanks a lot. Spend hours for this Wall Wall
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  tkinter button not accessing the command when clicked jhf2 1 246 Nov-23-2019, 10:17 PM
Last Post: DT2000
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 580 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  [Tkinter] Button command getting TypeError: radsa() missing 3 required positional arguments nonzzo 2 569 Apr-22-2019, 12:36 PM
Last Post: Larz60+
  [Tkinter] how to assign a command to a button ChickenWithRice 2 1,371 Dec-08-2018, 09:35 PM
Last Post: ChickenWithRice
  [Tkinter] Tkinter newly created button does not execute command ChipsSlave 7 1,927 Jul-25-2018, 01:01 AM
Last Post: JUANCARLOS
  SetValue to get event fired ian 1 777 May-25-2018, 06:07 PM
Last Post: Larz60+
  Event fired multiple times ian 1 706 May-12-2018, 06:09 PM
Last Post: Larz60+
  [Tkinter] Selected radio button in push button in Tkinter prashantfunde91 1 7,191 Jun-22-2017, 05:27 PM
Last Post: DeaD_EyE
  [Tkinter] Arguments in function for button command kristrek 14 11,767 Jan-11-2017, 09:16 PM
Last Post: kristrek

Forum Jump:


Users browsing this thread: 1 Guest(s)