Python Forum
GUI skips code part
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI skips code part
#4
(Feb-24-2021, 07:46 PM)deanhystad Wrote: It does not skip gamemain(), main() is being called from inside gamemain() as mentioned by menator01. Execution never returns to gamemain() after making the button, so you don't pack any of the labels, or the button. Since you don't pack the labels and button they do not become visible.

There should only be 1 mainloop(). It should be very near the bottom of your main module and it should be called using the window returned by Tk(). The call to mainloop() never returns unless you quit the GUI.

You are still thinking you are writing a console program. A GUI program has to be structured completely differently and really requires a different way of thinking about the problem. I suggest you do a few tkinter tutorials before trying to write your own program.
I have done my mini projekt with console app. I thought I would just step up a bit. But I think you know more. Anyways, thanks for the reply. Smile
Reply


Messages In This Thread
GUI skips code part - by MLGpotato - Feb-24-2021, 06:39 PM
RE: GUI skips code part - by menator01 - Feb-24-2021, 07:25 PM
RE: GUI skips code part - by deanhystad - Feb-24-2021, 07:46 PM
RE: GUI skips code part - by MLGpotato - Feb-25-2021, 05:59 AM
RE: GUI skips code part - by buran - Feb-27-2021, 11:07 AM
RE: GUI skips code part - by deanhystad - Feb-28-2021, 05:36 AM
RE: GUI skips code part - by buran - Feb-28-2021, 07:55 AM
RE: GUI skips code part - by deanhystad - Feb-28-2021, 11:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Part of code is adding extra new line when saving to text file. lovepeace 9 5,405 Aug-24-2019, 12:52 PM
Last Post: lovepeace

Forum Jump:

User Panel Messages

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