Multiple Button on_press calling same function

Post here if you need help with creating a Graphical User Interface in Python.

Multiple Button on_press calling same function

Postby pyjiggly » Mon Sep 19, 2016 4:50 pm

I have few buttons which call the same callback function on on_press. When in the callback function, how do I determine which button was clicked.
Last edited by micseydel on Mon Sep 19, 2016 5:02 pm, edited 1 time in total.
Reason: Initial post lock. Moved to GUI.
Posts: 3
Joined: Mon Sep 19, 2016 4:24 pm

Re: Multiple Button on_press calling same function

Postby Yoriz » Mon Sep 19, 2016 6:27 pm

More information required.
The gui you are using is not known.
Write a minimal piece of code that represents the full code, that can be run.
It should have at least two buttons that call on_press.
Due to the reasons discussed here we will be moving to on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 1672
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Return to GUI

Who is online

Users browsing this forum: No registered users and 2 guests