toplevel

Get list of Toplevels on Tkinter

╄→尐↘猪︶ㄣ 提交于 2021-01-29 02:12:50
问题 I wanted to know if there is a simple way to get all the toplevels from a specific window, including toplevels within toplevels. In the following code I leave an example of what I want to do: from tkinter import Tk, Toplevel v = Tk() v2 = Toplevel(v) v3 = Toplevel(v2) v4 = Toplevel(v2) def toplevels(ventana): print("Here I return the list of all toplevels, in case of choosing the main window, it should return:") print() print(".") print(".toplevel") print(".toplevel.toplevel") print("

Get list of Toplevels on Tkinter

淺唱寂寞╮ 提交于 2021-01-29 02:11:00
问题 I wanted to know if there is a simple way to get all the toplevels from a specific window, including toplevels within toplevels. In the following code I leave an example of what I want to do: from tkinter import Tk, Toplevel v = Tk() v2 = Toplevel(v) v3 = Toplevel(v2) v4 = Toplevel(v2) def toplevels(ventana): print("Here I return the list of all toplevels, in case of choosing the main window, it should return:") print() print(".") print(".toplevel") print(".toplevel.toplevel") print("

Get list of Toplevels on Tkinter

半城伤御伤魂 提交于 2021-01-29 02:07:24
问题 I wanted to know if there is a simple way to get all the toplevels from a specific window, including toplevels within toplevels. In the following code I leave an example of what I want to do: from tkinter import Tk, Toplevel v = Tk() v2 = Toplevel(v) v3 = Toplevel(v2) v4 = Toplevel(v2) def toplevels(ventana): print("Here I return the list of all toplevels, in case of choosing the main window, it should return:") print() print(".") print(".toplevel") print(".toplevel.toplevel") print("

How can I update entry widget entries in a toplevel window in tkinter?

我们两清 提交于 2020-05-17 06:06:02
问题 what I want to do, is to open from the root window a toplevel window in which I have series of entry widgets, modify the entries and close the window. I found a code in one of the posts and modified it to fit my need. The code works only the first time I open the toplevel window, but after that it opens the toplevel window without the entry fields! I don't understand what is happening!! Can anyone help please? I am quite new to python. Here is the code: from tkinter import * root = Tk() entry

How can I update entry widget entries in a toplevel window in tkinter?

拟墨画扇 提交于 2020-05-17 06:03:55
问题 what I want to do, is to open from the root window a toplevel window in which I have series of entry widgets, modify the entries and close the window. I found a code in one of the posts and modified it to fit my need. The code works only the first time I open the toplevel window, but after that it opens the toplevel window without the entry fields! I don't understand what is happening!! Can anyone help please? I am quite new to python. Here is the code: from tkinter import * root = Tk() entry

How to close previous window on tkinter?

一曲冷凌霜 提交于 2020-01-16 01:17:09
问题 I'm trying to close the previous window when I click the button to go to the next window. I'm not being able to do it. What's wrong? from tkinter import * def newwindow2(): newwindow.destroy() newwindow2 = tk.Toplevel() newwindow2.title('Nível da grama região 3') newwindow2.geometry('580x520') labl3 = Label(newwindow2, text='A foto do nível da grama na região 3 foi tirada: \n', font=30).place(x=110, y=10) tk.Button(newwindow2, text='Fim').place(x=250, y=470) def newwindow(): janela1.destroy()

Scrollable Toplevel Window (tkinter)

房东的猫 提交于 2019-12-25 08:22:46
问题 I'm pretty new to Python and have delopped a little program. In that program the user is able to open a Toplevel window as a popup which shows a map as an image file. I've managed to add a scrollbar to it and make the image scrollable. The reason for the scrollbar is to support different screen resolutions so that if the shown image is too big, the user can scroll the content of the popup. I now would like to ensure that the scrollbar changes size, when the popup window changes size or isn't

Pass user input from child to parent window python tkinter

柔情痞子 提交于 2019-12-24 23:53:36
问题 I'm pretty new to Python, and even more new to tkinter. I've searched for an answer to this question and gotten some things that seem close, but none that I have been able to successfully implement. Basically what I'm trying to do is create a main window with a dropdown list for the user to select an item from. When the user makes a selection, a simple calculation is done and the result printed to the screen. One of the choices is 'User Defined'. When this selection is made, I would like to

Name Clash with Top Level constant when autoloading with Rails

北城余情 提交于 2019-12-24 00:48:53
问题 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, since the behaviour is exaclty the same in all situations): Deeply::Nested::Dog Services::My::Deeply::Nested::Dog ::Services::My::Deeply::Nested::Dog No matter which of the above I choose, I always get the following error message: services/my.rb: