Python Forum
Help Making A Toggle GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Making A Toggle GUI
#8
You have still posted code that will not run as it is.
by using a for loop every time the button is clicked all that is happening is the following:
a for loop that gives click the values 0 to 3
  • when click is 0 the else code happens.
  • when click is 1 the if code happens.
  • when click is 2 the elif code happens.
  • when click is 3 the else code happens.
This whole for loop happens every time the button is clicked and ends with the else code being the visible state.

You need to actually change the state and only do one of the states when the button is clicked , like it does in my example above.
Reply


Messages In This Thread
Help Making A Toggle GUI - by TheBabaYaga202 - Aug-24-2019, 06:53 AM
RE: Help Making A Toggle GUI - by Yoriz - Aug-24-2019, 11:45 AM
RE: Help Making A Toggle GUI - by TheBabaYaga202 - Aug-25-2019, 07:05 AM
RE: Help Making A Toggle GUI - by Yoriz - Aug-25-2019, 08:53 AM
RE: Help Making A Toggle GUI - by TheBabaYaga202 - Aug-25-2019, 10:52 AM
RE: Help Making A Toggle GUI - by Yoriz - Aug-25-2019, 11:08 AM
RE: Help Making A Toggle GUI - by TheBabaYaga202 - Aug-25-2019, 01:12 PM
RE: Help Making A Toggle GUI - by Yoriz - Aug-25-2019, 01:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  tkinter toggle buttons not working Nu2Python 26 7,045 Jan-23-2022, 06:49 PM
Last Post: Nu2Python
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 5,052 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  [Tkinter] TkInter toggle Label on/off MTom5 2 5,412 Aug-15-2018, 12:35 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

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