1
0
Fork 0

Small modifications to the test form.

This commit is contained in:
Miguel de Benito 2012-03-08 17:32:06 +00:00
parent 9a542ac6bb
commit 85b6e4b427
1 changed files with 38 additions and 29 deletions

View File

@ -85,12 +85,16 @@
\ \ \ \ \ \ \ \ \ \ (toggle (display* "Second " answer "\\n") #f)))))) \ \ \ \ \ \ \ \ \ \ (toggle (display* "Second " answer "\\n") #f))))))
<|unfolded-io> <|unfolded-io>
((guile-user) (guile-user)) ((guile-user) (kernel gui menu-test))
</unfolded-io> </unfolded-io>
<\input|Scheme] > <\input|Scheme] >
(top-window widget1 "A bigger window") (top-window widget1 "A bigger window")
</input> </input>
<\input|Scheme] >
\;
</input>
</session> </session>
<with|color|red|This should of course work!> <with|color|red|This should of course work!>
@ -153,59 +157,64 @@
<scm|form-> : <scm|form-> :
<\session|scheme|default> <\session|scheme|default>
<\unfolded-io|Scheme] > <\folded-io|Scheme] >
(tm-widget (form3 cmd) (tm-widget (form3 cmd)
\ \ (form "Test" \ \ (resize "500px" "500px"
\ \ \ \ (centered \ \ \ \ (padded
\ \ \ \ \ \ (aligned \ \ \ \ \ \ (form "Test"
\ \ \ \ \ \ \ \ (item (text "Input:") \ \ \ \ \ \ \ \ (aligned
\ \ \ \ \ \ \ \ \ \ (form-input "fieldname1" "string" '("one" "two" \ \ \ \ \ \ \ \ \ \ (item (text "Input:")
"three") "1w"))
\ \ \ \ \ \ \ \ (item (text "Enum:") \ \ \ \ \ \ \ \ \ \ \ \ (form-input "fieldname1" "string" '("one")
"1w"))
\ \ \ \ \ \ \ \ \ \ (form-enum "fieldname2" '("one" "two" "three") \ \ \ \ \ \ \ \ \ \ (item === ===)
\ \ \ \ \ \ \ \ \ \ (item (text "Enum:")
\ \ \ \ \ \ \ \ \ \ \ \ (form-enum "fieldname2" '("one" "two" "three")
"two" "1w")) "two" "1w"))
\ \ \ \ \ \ \ \ (item (text "Choice") \ \ \ \ \ \ \ \ \ \ (item === ===)
\ \ \ \ \ \ \ \ \ \ (form-choice "fieldname3" '("one" "two" "three") \ \ \ \ \ \ \ \ \ \ (item (text "Choice:")
"one"))
\ \ \ \ \ \ \ \ (item (text "Choices") \ \ \ \ \ \ \ \ \ \ \ \ (form-choice "fieldname3" '("one" "two"
"three") "one"))
\ \ \ \ \ \ \ \ \ \ (form-choices "fieldname4"\ \ \ \ \ \ \ \ \ \ \ (item === ===)
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '("one" "two" "three")\ \ \ \ \ \ \ \ \ \ \ (item (text "Choices:")
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '("one" "two")))) \ \ \ \ \ \ \ \ \ \ \ \ (form-choices "fieldname4"\
\ \ \ \ \ \ (bottom-buttons \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '("one" "two"
"three")\
\ \ \ \ \ \ \ \ ("Cancel" (cmd "cancel")) \<gtr\>\<gtr\> \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ '("one" "two"))))
\ \ \ \ \ \ \ \ ("Ok" \ \ \ \ \ \ \ \ (bottom-buttons
\ \ \ \ \ \ \ \ \ (display* (form-fields) " -\<gtr\> " (form-values) \ \ \ \ \ \ \ \ \ \ ("Cancel" (cmd "cancel")) \<gtr\>\<gtr\>
"\\n")
\ \ \ \ \ \ \ \ \ (cmd "ok")))))) \ \ \ \ \ \ \ \ \ \ ("Ok"
<|unfolded-io>
\ \ \ \ \ \ \ \ \ \ \ (display* (form-fields) " -\<gtr\> "
(form-values) "\\n")
\ \ \ \ \ \ \ \ \ \ \ (cmd "ok")))))))
<|folded-io>
((guile-user) (guile-user)) ((guile-user) (guile-user))
</unfolded-io> </folded-io>
<\input|Scheme] > <\input|Scheme] >
(dialogue-window form3 (lambda (x) (display* x "\\n")) "Test of form3") (dialogue-window form3 (lambda (x) (display* x "\\n")) "Test of form3")
</input> </input>
<\input|Scheme] >
\;
</input>
</session> </session>
A complete list of the widgets you can embed in a form is in the table A complete list of the widgets you can embed in a form is in the table