Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open Tk ;;
- let top = openTk () ;;
- Wm.title_set top "Application 16" ;;
- let v = Textvariable.create () ;;
- Textvariable.set v "OFF" ;;
- let b = Checkbutton.create
- ~text:"Case à cocher"
- ~variable:v
- ~onvalue:"ON" ~offvalue:"OFF"
- top ;;
- let bq = Button.create
- ~text:"The end"
- ~command:(fun () ->
- Printf.printf "%s\nBye.\n" (Textvariable.get v);
- closeTk () ; exit 0)
- top ;;
- pack [coe b;coe bq] ;;
- let _ = Printexc.print mainLoop ();;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement