To deanhystad, I am using a provided solution by another member as a framework. the only thing I did was add a couple of windows so I have the number of windows to match what I am trying to do. The way the script I wanto to behave is to always have a window on top so only keyboard input can be used. I am trying to replicate a pre GUI type setup from circa 1970s. I should have prefaced that, so apologies on the lack of clarity.
To yoriz, normally I would reply to this with a direct message but that option is not available to me, is the intention to keep threads as singular as possible for solutions ability, or is it to demuddle things when folks are searching for things? The forum policies are not clearly delineated in the manner and in most help forums they typically want things self contained so experience bias is apparently creating behaviors counter to what you desire here. But this is also the first real educational forum I have had any amount of interactions on. I just have to be notified on how you want behaviors to occur so I can comply, but things were not clearly defined in the forum rules outside of the usual golden rule list of things, and the plagiarism/cheating stuff. Not sure if that is an ongoing discussion regarding posting guidelines and explicitly saying if your answer created another issue, create another thread type rule, or if that rule is buried in with the others as it did not stick out for me. Having written many, many, knowledge base articles myself, sometimes you miss things trying to cover all bases and it takes occurrences to hash out where tweaks need to occur. To say it another way it is hard to follow the rules when not all the rules are written as it is assumed they are implicitly understood or you are in a kangaroo court where the rules are what whatever anyone decides at any point in time which I sincerely doubt are the case here.
As far as the code I can get the window to destroy via a button as exampled here:
To yoriz, normally I would reply to this with a direct message but that option is not available to me, is the intention to keep threads as singular as possible for solutions ability, or is it to demuddle things when folks are searching for things? The forum policies are not clearly delineated in the manner and in most help forums they typically want things self contained so experience bias is apparently creating behaviors counter to what you desire here. But this is also the first real educational forum I have had any amount of interactions on. I just have to be notified on how you want behaviors to occur so I can comply, but things were not clearly defined in the forum rules outside of the usual golden rule list of things, and the plagiarism/cheating stuff. Not sure if that is an ongoing discussion regarding posting guidelines and explicitly saying if your answer created another issue, create another thread type rule, or if that rule is buried in with the others as it did not stick out for me. Having written many, many, knowledge base articles myself, sometimes you miss things trying to cover all bases and it takes occurrences to hash out where tweaks need to occur. To say it another way it is hard to follow the rules when not all the rules are written as it is assumed they are implicitly understood or you are in a kangaroo court where the rules are what whatever anyone decides at any point in time which I sincerely doubt are the case here.
As far as the code I can get the window to destroy via a button as exampled here:
from tkinter import Tk, Toplevel, Button, Label, Text import tkinter as tk import tkinter.ttk as ttk import datetime as dt import time import os from tkinter import messagebox from collections import deque from itertools import islice from threading import Thread from playsound import playsound def open_a_toplevel_window () : toplevel_window = Toplevel (root) toplevel_window.title ('Focusing on Text Entery') toplevel_window.geometry ('270x100') label = Label(toplevel_window, text = 'Enter Text Now') label.pack() text_entry = Text (toplevel_window, width = 10, height = 3) text_entry.focus_set () text_entry.pack () toplevel_window.attributes ('-topmost', True) # toplevel_window.mainloop() def open_b_toplevel_window () : toplevel_window = Toplevel (root) toplevel_window.title ('Focusing on Text Entery') toplevel_window.geometry ('270x100') label = Label(toplevel_window, text = 'Enter Text Now') label.pack() text_entry = Text (toplevel_window, width = 10, height = 3) text_entry.focus_set () text_entry.pack () toplevel_window.attributes ('-topmost', True) # toplevel_window.mainloop() def open_c_toplevel_window () : toplevel_window = Toplevel (root) toplevel_window.title ('Focusing on Text Entery') toplevel_window.geometry ('270x100') label = Label(toplevel_window, text = 'Enter Text Now') label.pack() text_entry = Text (toplevel_window, width = 10, height = 3) text_entry.focus_set () text_entry.pack () toplevel_window.attributes ('-topmost', True) # toplevel_window.mainloop() def open_d_toplevel_window () : toplevel_windows = Toplevel (root) toplevel_windows.title ('Inititaling') toplevel_windows.geometry ('512x256') toplevel_windows.configure(background='black') # toplevel_windows.overrideredirect(True) text_entry = Button (toplevel_windows, width = 10, height = 3, command=toplevel_windows.destroy) text_entry.focus_set () text_entry.pack () toplevel_windows.attributes ('-topmost', True) toplevel_windows.mainloop() root = tk.Tk () root.title ("Root Window") root.geometry ("512x256") label1 = Label (root, text = "This is the Root Window") button = Button (root, text = "Open Toplevel Window") button.config (command = open_a_toplevel_window) button1 = Button (root, text = "Open Toplevel Windowb") button1.config (command = open_b_toplevel_window) button2 = Button (root, text = "Open Toplevel Windowc") button2.config (command = open_c_toplevel_window) label1.pack () button2.place (x = 50, y = 75) button1.place (x = 210, y = 100) button.place (x = 110, y = 50) open_d_toplevel_window () root.mainloop ()But the goal is to have a window popup and then disappear to the main window.
Yoriz write Apr-26-2021, 04:50 PM:
Please see a new thread I posted on your behalf
https://python-forum.io/Thread-Forum-rul...wn-threads
Please see a new thread I posted on your behalf
https://python-forum.io/Thread-Forum-rul...wn-threads