

Task

Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.).



Related task

   Hello world/Text


open XWindows ;
open Motif ;
 
val helloWindow = fn () =>
 
 let
  val shell = XtAppInitialise    ""    "demo" "top" [] [XmNwidth 400, XmNheight 300 ] ;
  val main  = XmCreateMainWindow shell "main" [XmNmappedWhenManaged true ] ;
  val text = XmCreateLabel main "show" [ XmNlabelString "Hello World!"] 
 in
 
  (
  XtManageChildren [text];
  XtManageChild    main;
  XtRealizeWidget  shell
  )
 
end;
 