added eugtk examples
This commit is contained in:
37
eugtk/examples/test68.ex
Normal file
37
eugtk/examples/test68.ex
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
---------------------------------------------------------------
|
||||
--# Locale
|
||||
---------------------------------------------------------------
|
||||
|
||||
include GtkEngine.e
|
||||
|
||||
-- following only works if you have spanish language installed;
|
||||
|
||||
include std/locale.e
|
||||
locale:set("es_MX.UTF-8")
|
||||
|
||||
constant docs = `<u><b>Locale</b></u>
|
||||
the button captions will change to español
|
||||
if a spanish language locale is installed.
|
||||
`
|
||||
constant win = create(GtkWindow,"size=300x100,position=1,$destroy=Quit")
|
||||
|
||||
constant panel = create(GtkBox,"border_width=10,orientation=1")
|
||||
gtk:add(win,panel)
|
||||
|
||||
constant lbl = create(GtkLabel,{{"markup",docs}})
|
||||
gtk:add(panel,lbl)
|
||||
|
||||
constant box = create(GtkButtonBox)
|
||||
pack(panel,-box)
|
||||
|
||||
gtk:add(box,{
|
||||
create(GtkButton,"gtk-quit","Quit"),
|
||||
create(GtkButton,"gtk-ok")})
|
||||
|
||||
show_all(win)
|
||||
main()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user