1
- from tkinter import Event , Misc , Toplevel
2
- from typing import Any
1
+ from tkinter import Event , Frame , Misc , Toplevel
3
2
4
3
class Dialog (Toplevel ):
5
4
def __init__ (self , parent : Misc | None , title : str | None = ...) -> None : ...
6
- def body (self , master ) -> None : ...
5
+ def body (self , master : Frame ) -> Misc | None : ...
7
6
def buttonbox (self ) -> None : ...
7
+ def ok (self , event : Event [Misc ] | None = ...) -> None : ...
8
+ def cancel (self , event : Event [Misc ] | None = ...) -> None : ...
9
+ def validate (self ) -> bool : ...
10
+ def apply (self ) -> None : ...
8
11
9
12
class SimpleDialog :
10
13
def __init__ (
@@ -22,6 +25,30 @@ class SimpleDialog:
22
25
def wm_delete_window (self ) -> None : ...
23
26
def done (self , num : int ) -> None : ...
24
27
25
- def askfloat (title : str | None , prompt : str , ** kwargs : Any ) -> float | None : ...
26
- def askinteger (title : str | None , prompt : str , ** kwargs : Any ) -> int | None : ...
27
- def askstring (title : str | None , prompt : str , ** kwargs : Any ) -> str | None : ...
28
+ def askfloat (
29
+ title : str | None ,
30
+ prompt : str ,
31
+ * ,
32
+ initialvalue : float | None = ...,
33
+ minvalue : float | None = ...,
34
+ maxvalue : float | None = ...,
35
+ parent : Misc | None = ...,
36
+ ) -> float | None : ...
37
+ def askinteger (
38
+ title : str | None ,
39
+ prompt : str ,
40
+ * ,
41
+ initialvalue : int | None = ...,
42
+ minvalue : int | None = ...,
43
+ maxvalue : int | None = ...,
44
+ parent : Misc | None = ...,
45
+ ) -> int | None : ...
46
+ def askstring (
47
+ title : str | None ,
48
+ prompt : str ,
49
+ * ,
50
+ initialvalue : str | None = ...,
51
+ show : str | None = ...,
52
+ # minvalue/maxvalue is accepted but not useful.
53
+ parent : Misc | None = ...,
54
+ ) -> str | None : ...
0 commit comments