added eugtk examples
This commit is contained in:
27
eugtk/examples/glade/test116.ex
Normal file
27
eugtk/examples/glade/test116.ex
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
--# ComboBox demo, compare with demos/test116.ex
|
||||
|
||||
include GtkEngine.e
|
||||
|
||||
add(builder,"~/demos/glade/test116.glade")
|
||||
|
||||
constant items = {
|
||||
{"Fish",create(GdkPixbuf,"thumbnails/fish.svg",30,30)},
|
||||
{"Fox",create(GdkPixbuf,"thumbnails/fox.svg",30,30)},
|
||||
{"Mouse",create(GdkPixbuf,"thumbnails/mouse.svg",30,30)}
|
||||
}
|
||||
|
||||
set("liststore1","data",items)
|
||||
set("combobox1","active",1)
|
||||
|
||||
main()
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
global function on_combobox1_changed(atom cb, atom win)
|
||||
-----------------------------------------------------------------------
|
||||
integer i = get(cb,"active")
|
||||
set(win,"title",items[i][1])
|
||||
set(win,"icon",items[i][2])
|
||||
return 1
|
||||
end function
|
||||
|
||||
Reference in New Issue
Block a user