Simple windowed application: Difference between revisions

m
update for newer Gtk version
m (update for newer Gtk version)
Line 1,813:
=={{header|Julia}}==
Uses the Gtk library.
<lang julia>using Gtk.ShortNames
using Gtk.ShortNames
 
 
function clickwindow()
Line 1,824 ⟶ 1,822:
push!(vbox, lab)
push!(vbox, but)
setpropertyset_gtk_property!(vbox, :expand, lab, true)
setpropertyset_gtk_property!(vbox, :spacing, 20)
callback(w) = (clicks += 1; setpropertyset_gtk_property!(lab, :label, "There have been $clicks button clicks."))
id = signal_connect(callback, but, ":clicked")
Gtk.showall(win)
c = Condition()
endit(w) = notify(c)
signal_connect(endit, win, :destroy)
showall(win)
wait(c)
end
 
 
clickwindow()
4,102

edits