(************************************************************ labeltest.ml Created : Fri Feb 21 22:48:03 2003 Last modified: Fri Feb 21 23:24:48 2003 Compile: ocamlc.opt -I +labltk labltk.cma labeltest.ml -o labeltest # FTP Directory: sources/ocaml # ************************************************************) (** とっても小さい labltk プログラム @author Takashi Masuyama *) open Tk let _ = let widget = openTk () in let label = Label.create ~name:"button" ~text:"mamewo OK!?" widget in begin pack ~fill:`Both [label]; bind ~events:[`ButtonPress] ~fields:[`RootX] ~action:(fun x -> print_endline "hogehoge"; flush stdout; update ()) widget; mainLoop () end