GUI enabling/disabling of controls: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
mNo edit summary
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(3 intermediate revisions by 2 users not shown)
Line 269:
; Ensures the script ends when the GUI is closed.</syntaxhighlight>
 
=={{header|BaConBASIC}}==
==={{header|BaCon}}===
This code requires BaCon 4.0.1 or higher.
<syntaxhighlight lang="bacon">OPTION GUI TRUE
Line 306 ⟶ 307:
WEND</syntaxhighlight>
 
==={{header|BBC BASIC}}===
{{works with|BBC BASIC for Windows}}
<syntaxhighlight lang="bbcbasic"> INSTALL @lib$+"WINLIB2"
Line 2,998 ⟶ 2,999:
Graphical
 
Notes:
Note: For alternative UI toolkits, check github.com/vlang/awesome-v (Awesome V)
 
1) "v install ui" to get, also to locally check source and examples.
 
Note:2) For alternative UI toolkits, check github.com/vlang/awesome-v (Awesome V).
 
<syntaxhighlight lang="Zig">
import ui
Line 3,007 ⟶ 3,013:
win_height = 40
)
 
[heap]
struct App {
Line 3,054 ⟶ 3,061:
 
fn (mut app App) btn_click_inc(mut btn ui.Button) {
 
if app.counter.int() > 10 {
btn.disabled = true
return
}
Line 3,063 ⟶ 3,069:
 
fn (mut app App) btn_click_dec(mut btn ui.Button) {
if app.counter.int() < 0 {
btn.disabled = true
Line 3,075 ⟶ 3,080:
{{libheader|DOME}}
{{libheader|Wren-polygon}}
<syntaxhighlight lang="ecmascriptwren">import "graphics" for Canvas, Color
import "input" for Mouse, Keyboard
import "dome" for Window
9,487

edits