Questions tagged [toplevel]

toplevel may refer to: 1. a Toplevel window in [tag:tkinter], 2. a syntactic top level construct, 3. a kind of REPL, such as [tag:utop], [tag:ocaml-toplevel] and [tag:prolog-toplevel]. Prefer to use the more specific tags where applicable, as this one is rather ambiguous.

toplevel may refer to:

  1. a Toplevel window in
  2. a syntactic top level construct, ie. the syntactic constructs that may appear at the topmost level of a file
  3. a kind of , such as , and .
262 questions
-1
votes
2 answers

Why do I get an extra empty window in Tkinter?

Here is my code: from tkinter import * OPTIONS = ["Available","Busy","Invisible","Away"] now = Toplevel() variable = StringVar(now) variable.set(OPTIONS[0]) # default value details = {"U_status":""} def verify(): global u_status …
Code Carbonate
  • 640
  • 10
  • 18
-1
votes
2 answers

Toplevel in tkinter is creating another empty window at the side

I am new in python. I was trying to write a code with tkinter. In click of a button it should open another window and close the previous window. The code is closing the previous window correctly. But the problem is it is also opening another empty…
Gazi Safin
  • 23
  • 5
-1
votes
1 answer

How to scale label font size inside a 'Toplevel' Tkinter Window?

Working on displaying some information inside a tkinter 'Toplevel' window. I want the text size to increase as you increase the size of the window. For this I am just using the label widget inside a toplevel widget. I've made a function that…
ty1
  • 334
  • 4
  • 19
-1
votes
2 answers

my buttons in tkinter don't work! tried everything

I'm trying to write a game. So far I've made a grid of buttons, but I can't seem to make the buttons work the way i want them to. I think the problem lies in x and y not being connected to the actual buttons, but I've tried everything and I can't…
user11175287
-1
votes
1 answer

How can I introduce a image button in a toplevel window?

I'm creating a simple program in tkinter and i want to put a image button in a toplevel window, but when i do this the program give me this callback: self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: image…
I. Krehan
  • 23
  • 5
-1
votes
1 answer

Passing 3 arguments but trackback says I am passing 4

I have been trying to find the problem here for hours. From what I can find online people are actually passing more arguments than they think for all the post I can find related to this TypeError. For some reason this problem seams to only happen…
Mike - SMT
  • 14,784
  • 4
  • 35
  • 79
-1
votes
1 answer

Can I use a picture as a icon on a button in Toplevel ()?

In python, I can use a picture as a icon on a button in Tk() instance. But when I trying to use the picture in case of Toplevel(), it does not work. code: from tkinter import * root=Tk() root.title("Login Window") root.geometry("300x300") def…
suraj pal
  • 29
  • 5
-1
votes
1 answer

Tkinter Python RadioButton not selecting

Hi I am a relatively new developer (about 1 year of java and just started working with python a few weeks ago) and am having trouble getting radio buttons to work on a toplevel window in python. I have searched through different questions and…
-1
votes
2 answers

Why tkinter toplevel can't be created repeatedly inside a loop in Python3?

I want the program to: make the root window to remain open and when the button is clicked it will open a toplevel window In the toplevel window when next is clicked, it will destroy that toplevel window and create another toplevel window and this…
Ani
  • 7
  • 2
-1
votes
1 answer

Android Studio errors. After trying so many solution not able to configure it out.PC RAM 4gb

Error:UNEXPECTED TOP-LEVEL ERROR: Error:java.lang.OutOfMemoryError: Java heap space Error:Picked up _JAVA_OPTIONS: -Xmx512M Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException:…
-1
votes
1 answer

I'm having trouble getting a new window to open with Toplevel

This is the error I'm getting when button to open new window is pressed. Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 1699, in __call__ return…
jaguar419
  • 13
  • 4
-1
votes
1 answer

Message Box alternative with many customized options

I'm currently working on a university assignment. I create a main window with the App class where the game is played. Before this App class is initialized, I want to bring up another window with customized buttons like "BASIC", "ADVANCED", etc.…
Sphero
  • 303
  • 1
  • 3
  • 8
-1
votes
2 answers

Python Closing Toplevel Window Error

I wanted this code to create a popup error window that destroys itself after 4 seconds but can also be closed via a button. def error(self): top = Toplevel() top.after(4000, lambda: top.destroy()) center_window(300,100, top) …
-1
votes
1 answer

New instance of toplevel classes make overlapping widgets

I'm generally new to python and tkinter. I've been programming maybe about a year or so, and I've just started to try to make each tkinter toplevel window its own class because I've heard that it's the right way to do it. I'm making a program in…
-1
votes
2 answers

How should I make a class that can be used as my main app window, but also can be used as a secondary window

I know that I can subclass a tk.Frame (or ttk.Frame) and add that to a TopLevel to make secondary windows, but I'm not sure how I should use that as the main window. I know that creating an instance of a Frame class and calling .mainloop() on it…
Grezzo
  • 2,220
  • 2
  • 22
  • 39
1 2 3
17
18