* [Caml-list] Tk newbie question @ 2002-02-18 17:33 Carlos Eduardo Lenz 2002-02-18 19:04 ` Sami Mäkelä 0 siblings, 1 reply; 3+ messages in thread From: Carlos Eduardo Lenz @ 2002-02-18 17:33 UTC (permalink / raw) To: caml-list [-- Attachment #1: Type: TEXT/PLAIN, Size: 162 bytes --] I'm having problems to make the menu to appear in my program. Attached is an example: it only shows the label. What am I missing? Carlos E Lenz lenz@inf.ufsc.br [-- Attachment #2: Type: TEXT/PLAIN, Size: 574 bytes --] open Tk let tk = openTk () let bar = Frame.create ~borderwidth:2 ~relief:(`Raised) tk let bmenu = Menubutton.create ~text:"File..." ~underline:0 bar let menu = Menu.create bmenu let frm = Frame.create tk let label = Label.create ~text:"funcionou?" frm let _ = Menubutton.configure ~menu:menu bmenu; List.iter (function x->Menu.add_command ~label:x ~command:(fun ()->print_endline x) menu) ["New";"Open";"Close"]; Menu.add_command ~label:"Exit" ~command:closeTk menu; pack ~inside:frm [label]; pack ~side:(`Top) ~fill:(`X) [barra;frm]; mainLoop () ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Tk newbie question 2002-02-18 17:33 [Caml-list] Tk newbie question Carlos Eduardo Lenz @ 2002-02-18 19:04 ` Sami Mäkelä 2002-02-19 2:43 ` Debian User 0 siblings, 1 reply; 3+ messages in thread From: Sami Mäkelä @ 2002-02-18 19:04 UTC (permalink / raw) To: Carlos Eduardo Lenz; +Cc: caml-list > I'm having problems to make the menu to appear in my program. > Attached is an example: it only shows the label. > What am I missing? You forgot to pack 'bmenu' (which is a graphical element). ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Tk newbie question 2002-02-18 19:04 ` Sami Mäkelä @ 2002-02-19 2:43 ` Debian User 0 siblings, 0 replies; 3+ messages in thread From: Debian User @ 2002-02-19 2:43 UTC (permalink / raw) To: caml-list Thanks, now it works. I guess I missed this from the examples I download because of pre-label syntax! On Mon, Feb 18, 2002 at 09:04:03PM +0200, Sami M?kel? wrote: > > I'm having problems to make the menu to appear in my program. > > Attached is an example: it only shows the label. > > What am I missing? > > You forgot to pack 'bmenu' (which is a graphical element). > Carlos Eduardo Lenz lenz@inf.ufsc.br ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-19 3:44 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-02-18 17:33 [Caml-list] Tk newbie question Carlos Eduardo Lenz 2002-02-18 19:04 ` Sami Mäkelä 2002-02-19 2:43 ` Debian User
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox