]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/combo.ml
"Final" commit that patches termViewer while still enabling XML Diffing.
[helm.git] / helm / DEVEL / lablgtk / lablgtk_20000829-0.1.0 / examples / combo.ml
1 (* $Id$ *)
2
3 open GMain
4
5 let make_arrow_label combo ~label ~string =
6   let item = GList.list_item () in (* no packing here, it blocks GTK *)
7   let hbox = GPack.hbox ~spacing:3 ~packing:item#add () in
8   GMisc.arrow ~kind:`RIGHT ~shadow:`OUT ~packing:hbox#pack ();
9   GMisc.label ~text:label ~packing:hbox#pack ();
10   combo#set_item_string item string;
11   combo#list#add item;
12   item
13
14 let main () =
15   let window = GWindow.window ~border_width:10 () in
16   window#connect#destroy ~callback:Main.quit;
17   let combo = GEdit.combo ~packing:window#add () in
18   make_arrow_label combo ~label:"First item" ~string:"1st item";
19   make_arrow_label combo ~label:"Second item" ~string:"2nd item";
20   window#show ();
21   Main.main ()
22   
23 let _ = main ()