47 lines
1.7 KiB
Text
47 lines
1.7 KiB
Text
{{omit from|ACL2}}
|
|
{{omit from|Applesoft BASIC|no concept of a GUI}}
|
|
{{omit from|AWK|no concept of a GUI}}
|
|
{{omit from|Batch File}}
|
|
{{omit from|Blast}}
|
|
{{omit from|Brainf***}}
|
|
{{omit from|Commodore BASIC}}
|
|
{{omit from|GUISS|Can only do what the installed applications can do}}
|
|
{{omit from|Integer BASIC|no concept of a GUI}}
|
|
{{omit from|Lilypond}}
|
|
{{omit from|Logtalk}}
|
|
{{omit from|Lotus 123}}
|
|
{{omit from|Maxima}}
|
|
{{omit from|PARI/GP}}
|
|
{{omit from|PostScript}}
|
|
{{omit from|Retro}}
|
|
{{omit from|SQL PL|It does not handle GUI}}
|
|
|
|
In addition to fundamental [[GUI component interaction]], an application should
|
|
dynamically enable and disable GUI components, to give some guidance to the
|
|
user, and prohibit (inter)actions which are inappropriate in the current state
|
|
of the application.
|
|
|
|
|
|
;Task:
|
|
Similar to the task [[GUI component interaction]], write a program
|
|
that presents a form with three components to the user:
|
|
::# a numeric input field ("Value")
|
|
::# a button ("increment")
|
|
::# a button ("decrement")
|
|
|
|
<br>
|
|
The field is initialized to zero.
|
|
The user may manually enter a new value into the field,
|
|
increment its value with the "increment" button,
|
|
or decrement the value with the "decrement" button.
|
|
|
|
The input field should be enabled only when its value is zero.
|
|
The "increment" button only as long as the field's value is less then 10:
|
|
When the value 10 is reached, the button should go into a disabled state.
|
|
Analogously, the "decrement" button should be enabled only as long as
|
|
the value is greater than zero.
|
|
|
|
Effectively, the user can now either increment up to 10, or down to zero.
|
|
Manually entering values outside that range is still legal,
|
|
but the buttons should reflect that and enable/disable accordingly.
|
|
<br><br>
|