caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [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

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;
as well as URLs for NNTP newsgroup(s).