USE CITScreen
USE CITWindow
USE CITText

DIM Error OF SHORT

DIM DemoWindow OF CITWindow
DemoWindow.Position(50,20)
DemoWindow.Size(530,150)
DemoWindow.CloseGadget
DemoWindow.DragBar
DemoWindow.SizingGadget
DemoWindow.DepthGadget
DemoWindow.Activate
ComalScreen.InsObject(DemoWindow,Error)
IF Error THEN
  STOP "Could'nt open the window"
ENDIF

DIM Text OF CITText
Text.Position(100,50)
Text.Size(250,50,DOWN)
DemoWindow.InsObject(Text,Error)

Text.PenColor(3)
Text.Font("times.font",24)
Text.Print(10,10,"Hello world!")

WHILE NOT DemoWindow.ClosePressed DO WAIT

ComalScreen.RemObject(DemoWindow)
