Python Forum
[Tkinter] Tkinter window issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Tkinter window issue
#5
I made it work. Thanks to everybody! Toplevel will be my way to go with windows now.
  def check(self):
        alpha="abcdefghijklnopqrstuvwxyz"
        alpha_cap=alpha.upper()
        alpha=alpha+alpha_cap
        print (alpha_cap)
        self.t1=self.entry1.get()
        self.t2=self.entry2.get()
        self.t3=self.entry3.get()
        self.t4=self.entry4.get()
        
        if self.t1 in alpha or self.t2 in alpha or self.t3 in alpha or self.t4 in alpha:
            root.withdraw()
            alertwindow=Toplevel()
            alertlabel=Label(alertwindow,text="Παρακαλω,βαλε μονο ακαιρεους αριθμους!")
            alertlabel.pack()
            alertbutton=Button(alertwindow,text="Ξαναπροσπάθησε",command=self.restart)
            alertbutton.pack()
            
        if self.t1!=self.t3 or self.t2!=self.t4:
            self.answer=Label(self.root,text="Δεν μπορείς να προσθέσεις πίνακες διαφορετικών διαστάσεων",font="Arial 15")
            self.answer.grid(row=9,column=1)
            self.clear=Button(self.root,text="Ξαναπροσπάθησε",font="Arial 12",command=self.refresh)
            self.clear.grid(row=11,column=1)      
        else:
            self.creation()
           
Reply


Messages In This Thread
Tkinter window issue - by frequency - Dec-22-2018, 10:54 PM
RE: Tkinter window issue - by Larz60+ - Dec-23-2018, 03:40 AM
RE: Tkinter window issue - by woooee - Dec-23-2018, 04:49 PM
RE: Tkinter window issue - by frequency - Dec-23-2018, 05:56 PM
RE: Tkinter window issue - by frequency - Dec-24-2018, 10:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 342 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  Tkinter multiple windows in the same window tomro91 1 786 Oct-30-2023, 02:59 PM
Last Post: Larz60+
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,379 May-25-2023, 07:37 PM
Last Post: deanhystad
Lightbulb [Tkinter] Tkinter Class Import Module Issue AaronCatolico1 6 2,970 Sep-06-2022, 03:37 PM
Last Post: AaronCatolico1
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 1,831 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  [Tkinter] Background inactivity timer when tkinter window is not active DBox 4 2,864 Apr-16-2022, 04:04 PM
Last Post: DBox
  why my list changes to a string as I move to another window in tkinter? pymn 4 2,546 Feb-17-2022, 07:02 AM
Last Post: pymn
  [Tkinter] Tkinter Window Has no Title Bar gw1500se 4 2,795 Nov-07-2021, 05:14 PM
Last Post: gw1500se
  "tkinter.TclError: NULL main window" Rama02 1 5,782 Feb-04-2021, 06:45 PM
Last Post: deanhystad
  Super basic tkinter arduino issue Kurta 3 2,377 Jan-07-2021, 05:22 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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