added eugtk examples
This commit is contained in:
39
eugtk/examples/test98.ex
Normal file
39
eugtk/examples/test98.ex
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
-------------------------------------------------------
|
||||
--# Mnemonic Labels
|
||||
-------------------------------------------------------
|
||||
|
||||
include GtkEngine.e
|
||||
|
||||
constant docs = `<u><b>Mnemonic Label</b></u>
|
||||
Use alt-E to activate this one.`
|
||||
|
||||
constant win = create(GtkWindow,"size=300x100,border_width=5,position=1,$destroy=Quit")
|
||||
|
||||
constant panel = create(GtkBox,"orientation=VERTICAL")
|
||||
add(win,panel)
|
||||
|
||||
constant lbl1 = create(GtkLabel)
|
||||
set(lbl1,"markup",docs)
|
||||
add(panel,lbl1)
|
||||
|
||||
constant lbl2 = create(GtkLabel)
|
||||
set(lbl2,"markup with mnemonic","Fred & _Ethel")
|
||||
add(panel,lbl2)
|
||||
|
||||
constant btn1 = create(GtkButton,"gtk-quit","Quit")
|
||||
constant btn2 = create(GtkButton,"gtk-ok",_("Foo"))
|
||||
constant btnbox = create(GtkButtonBox)
|
||||
add(btnbox,{btn1,btn2})
|
||||
pack(panel,-btnbox)
|
||||
set(lbl2,"mnemonic widget",btn2)
|
||||
|
||||
show_all(win)
|
||||
main()
|
||||
|
||||
------------------------
|
||||
function Foo()
|
||||
------------------------
|
||||
set(lbl2,"markup","Fred & Ethel,\n<b><i>The Mertzes</i></b>")
|
||||
return 1
|
||||
end function
|
||||
Reference in New Issue
Block a user