I have the following code
window = Tk()
window.lift()
window.attributes(\"-topmost\", True)
This co
For Linux (Ubuntu 16.04.6 LTS) I tried many suggestions including .grab which broke things. In the end I used:
if self.top2_is_active is True: # Are we already playing songs?
self.top2.focus_force() # Get focus
self.top2.lift() # Raise in stacking order
root.update()
return # Don't want to start playing again
It's not really "stealing" focus because I have a button on the main window defined as:
''' ▶ Play Button '''
self.play_text="▶ Play" # play songs window is opened.
self.listbox_btn2 = tk.Button(frame3, text=self.play_text, \
width=BTN_WID, command=self.play_items)
self.listbox_btn2.grid(row=0, column=1, padx=2)
After clicking this button the text is changed to:
self.listbox_btn2 ["text"] = "