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
10
votes
1 answer

Difference between private top-level extension function and private extension function inside class

We are currently switching our project to Kotlin, and ran across following question: We need a certain extension function only inside a given class. Thus, we have two possibilities: (1) Declaring the extension function private on the file top-level…
Markus Weninger
  • 11,931
  • 7
  • 64
  • 137
9
votes
1 answer

Tk(), Toplevel() and winfo_toplevel(). Difference between them and how and when to use effectively?

I am trying to understand how a widget is being created. And I found above three functions are getting used in creating a widget, yet I couldn't come up with the difference and the advantage of one over the other. Even though, I had taken a look on…
cs2612
  • 131
  • 1
  • 8
7
votes
3 answers

How to remove minimize/maximize buttons while preserving the icon?

Is it possible to display the icon for my toplevel and root window after removing the minimize and maximize buttons? I tried using -toolwindow but the icon can't be displayed afterwards. Is there another way I can remove the min and max size buttons…
O JOE
  • 587
  • 2
  • 17
  • 31
7
votes
1 answer

In F# what does top-level mean?

When people talk about F# they sometimes mention the term top-level; what does top-level mean? For example in previous SO Q&A Error FS0037 sometimes, very confusing Defining Modules VS.NET vs F# Interactive What the difference between a namespace…
Guy Coder
  • 24,501
  • 8
  • 71
  • 136
5
votes
1 answer

NSInvalidArgumentException - 'Invalid top-level type in JSON write' - Swift

As mentioned in the title of post,I'm getting NSInvalidArgumentException - 'Invalid top-level type in JSON write' when trying to convert Dictionary to JSON Data in swift let userInfo: [String: String] = [ "user_name" : username!, …
iAkshay
  • 1,143
  • 1
  • 13
  • 35
5
votes
2 answers

Racket macro that defines multiple top-level forms?

I found myself defining syntax parameters with identical definitions except for their name so I decided to write a macro to make this simpler: (define-syntax (test-case-parameter stx) (syntax-parse stx [(_ parameter:id) …
Joseph Garvin
  • 20,727
  • 18
  • 94
  • 165
4
votes
2 answers

Why does holding down the 'X' button in a toplevel stop execution of main window in tkinter?

I have a program that needs to open Toplevel windows except the main Tk() window in tkinter. In the main window I have a Scale widget which is updated every 100 miliseconds with the after call. However in a state where the Toplevel window is open…
Thalis
  • 188
  • 2
  • 12
4
votes
2 answers

How to put a toplevel window in front of the main window in tkinter?

Is there any way to put a toplevel window in front of the main window? Here's the code: from tkinter import * root = Tk() root.geometry('1280x720') def create_new_window(): root2 = Toplevel() …
Lenovo 360
  • 569
  • 1
  • 7
  • 27
3
votes
1 answer

How to properly close tkinter Toplevel with matplotlib embeded?

I'm making a GUI application and I want to use matplotlib to display some plots. I have structured my code like that: import tkinter as tk from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk import matplotlib.pyplot…
3
votes
2 answers

Python Tkinter, destroy toplevel after function

I'm programming some drives with python using Tkinter as GUI. When my machine is running, I'd like to show the user a toplevel window with some information which should close itself after the function completes. This is my minimal example: from…
JohannesB
  • 31
  • 1
  • 3
3
votes
1 answer

Tkinter modal window doesn't let main window to be maximized

I have a strange problem. To understand what really happened, I tried myself and googled, but no result. I simplified my code: #mainw.py import tkinter as tk import modalw class Main(tk. Frame) : def__init__(self, master) : …
bzimor
  • 1,618
  • 2
  • 14
  • 26
3
votes
1 answer

Name Clash with Top Level constant when autoloading with Rails

I'm having a class Dog in app/models/dog.rb and another class Services::My::Deeply::Nested::Dog in app/services/my/deeply/nested/dog.rb. Now in Services::My (app/services/my.rb), I have a reference to one of the following (no need to distinguish,…
Kalsan
  • 822
  • 1
  • 8
  • 19
3
votes
1 answer

magento: trying to decipher level-top

I am trying to understand the flow of how the nav bar is being formed in magento and came across this line in topmenu.phtml that i could not figure out. getHtml('level-top') ?> I get how childblocks are called, but where is…
shriekz
  • 55
  • 2
  • 5
3
votes
1 answer

Tkinter Top Level window Sizing

I have been looking all over the web trying to find an a way to size a TopLevel() window in tkinter. I read the documentation and have been looking at effbot.org's tkinterbook. I see the options but I just can't seem to get them to work. def…
Stagnent
  • 71
  • 1
  • 2
  • 9
3
votes
1 answer

Top level using port maps with records in VHDL

To be able to support scalability in my VHDL design I started using records as in- and outputs for my components. Currently I am at the point where I want to link my component to the outside using port maps in a top level architecture. The problem…
Robin Hermans
  • 1,579
  • 1
  • 24
  • 52
1
2 3
17 18