module Entries where

import Tcl

entries = 
     do	w <- window []
	geometry w (WinSz (250, 250))

	f1 <- frame w []
	e1 <- entry w []
	setEntry e1 "Initial value"

	packAdd e1 [fillX,inFrame f1]
	packAdd f1 [fillX,packPadX 5,packPadY 10]

	f2 <- frame w []
	e2 <- entry w []
	setEntry e2 "Disabled entries"
	cset e2 [active_state Disabled]

	packAdd e2 [fillX,inFrame f2]
	packAdd f2 [fillX,packPadX 5,packPadY 10]

	f3 <- frame w []
	e3 <- entry w []
	s3 <- hscroll e3 []
	setEntry e3 "This entries is disabled. Scrolling is still possible"
	cset e3 [active_state Disabled]

	gridAdd e3 (0,0) [gfillXY,ginFrame f3]
	gridAdd s3 (0,1) [gfillX,ginFrame f3]
	packAdd f3 [packPadX 5,packPadY 10]

	f4 <- frame w []
	e4 <- entry w []
	s4 <- hscroll e4 []
	setEntry e4 "Press middle mouse button in text area to scroll"

	packAdd e4 [packV,fillX]
	packAdd s4 [packV,fillX]	
	packAdd f4 [expand True,fillX,packPadX 5,packPadY 10]

	return ()

