mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
fix input dialog for linux
This commit is contained in:
parent
779434dc29
commit
f302b045e3
@ -43,12 +43,12 @@ class CTkInputDialog(CTkToplevel):
|
|||||||
|
|
||||||
self.title(title)
|
self.title(title)
|
||||||
self.focus_force()
|
self.focus_force()
|
||||||
self.grab_set() # make other windows not clickable
|
|
||||||
self.lift() # lift window on top
|
self.lift() # lift window on top
|
||||||
self.attributes("-topmost", True) # stay on top
|
self.attributes("-topmost", True) # stay on top
|
||||||
self.protocol("WM_DELETE_WINDOW", self._on_closing)
|
self.protocol("WM_DELETE_WINDOW", self._on_closing)
|
||||||
self.after(0, self._create_widgets) # create widgets with slight delay, to avoid white flickering of background
|
self.after(0, self._create_widgets) # create widgets with slight delay, to avoid white flickering of background
|
||||||
self.after(500, lambda: self.resizable(False, False))
|
self.after(500, lambda: self.resizable(False, False))
|
||||||
|
self.grab_set() # make other windows not clickable
|
||||||
|
|
||||||
def _create_widgets(self):
|
def _create_widgets(self):
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ class App(customtkinter.CTk):
|
|||||||
self.seg_button_1.set("Value 2")
|
self.seg_button_1.set("Value 2")
|
||||||
|
|
||||||
def open_input_dialog(self):
|
def open_input_dialog(self):
|
||||||
dialog = customtkinter.CTkInputDialog(text="Type in a number:"*500, title="CTkInputDialog")
|
dialog = customtkinter.CTkInputDialog(text="Type in a number:"*50, title="CTkInputDialog")
|
||||||
print("CTkInputDialog:", dialog.get_input())
|
print("CTkInputDialog:", dialog.get_input())
|
||||||
|
|
||||||
def change_appearance_mode(self, new_appearance_mode: str):
|
def change_appearance_mode(self, new_appearance_mode: str):
|
||||||
|
Loading…
Reference in New Issue
Block a user