Page 1 of 1

Combined demo

Posted: Sat Jun 16, 2007 5:52 pm
by HPW
I put some of the current demos together:

(load "http://hpwsoft.de/anmeldung/html1/newLISP/gui-demo.lsp")

Also Combo and listbox echos right text in textearea:

Code: Select all

(define (action-handler)
	(if (= "MAIN:TheToggleButton" (args 0))
		(if (true? (args 1))
			(gs:disable 'TheButton 'TheImageButton 'TheRadioButton 'TheCheckBox 'TheMessage)
			(gs:enable 'TheButton 'TheImageButton 'TheRadioButton 'TheCheckBox 'TheMessage)
		))

	(if (= "MAIN:TheImageButton" (args 0))
		(gs:color-dialog 'TheFrame 'action-handler "Choose a color" 1 1 1))

	(if (= "MAIN:TheMessage" (args 0))
		(gs:confirm-dialog 'TheFrame 'action-handler 
				"A Message" "Enjoy GUI server" 
				"yes-no"
				;(amb "error" "informaton" "warning" "question" "plain")
		))

	(let (s "")
		(doargs (item)
			(write-buffer s (string item " ")))

		(if (or
			(= "MAIN:TheComboBox" (args 0))
			(= "MAIN:TheListBox" (args 0)))
			(write-buffer s (string (base64-dec (args 2)) " "))
		)

		(write-buffer s "\n")
		(gs:append-text 'MonitorArea s)
	)
)

Posted: Sun Jun 17, 2007 6:11 am
by didi
It's very nice to see all possibilities of the gui-server at once .

When i read through the manual of the gui-server it was sometimes difficult to imagine what was meant - this demo is a good idea !