Skip to content

Commit b3b3095

Browse files
committed
Tk updates
1 parent 0564be5 commit b3b3095

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/stdlib/TkInter.fs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ type Tk (screenName: string option) =
2828
member _.title() = nativeOnly
2929

3030
member _.update() = nativeOnly
31+
member _.mainloop() = nativeOnly
32+
member _.after(second: float, callback: unit -> unit) = nativeOnly
3133

3234
[<Import("Frame", "tkinter")>]
3335
type Frame(master: Misc) =
@@ -36,12 +38,13 @@ type Frame(master: Misc) =
3638
new (master: Tk, width: int, height: int, bg: string) = Frame(master :> Misc)
3739

3840
member _.bind(sequence : string, func: (Event -> unit)) : string option = nativeOnly
41+
member _.pack() : unit = nativeOnly
3942

4043
[<Import("Label", "tkinter")>]
41-
type Label (master: Misc) =
44+
type Label (master: Frame) =
4245
[<Import("Label", "tkinter")>]
4346
[<Emit("$0($1, text=$2, fg=$3, bg=$4)")>]
44-
new (master: Tk, text: string, fg: string, bg: string) = Label(master :> Misc)
47+
new (master: Frame, text: string, fg: string, bg: string) = Label(master)
4548

46-
[<Emit("$0(x=$1, y=$2)")>]
49+
[<Emit("$0.place(x=$1, y=$2)")>]
4750
member _.place(x: int, y: int) = nativeOnly

0 commit comments

Comments
 (0)