caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Carlos Eduardo Lenz <lenz@inf.ufsc.br>
To: caml-list@inria.fr
Subject: [Caml-list] Tk newbie question
Date: Mon, 18 Feb 2002 14:33:30 -0300 (EST)	[thread overview]
Message-ID: <Pine.GSO.4.10.10202181428240.3569-200000@juno> (raw)

[-- 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 ()

             reply	other threads:[~2002-02-18 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-18 17:33 Carlos Eduardo Lenz [this message]
2002-02-18 19:04 ` Sami Mäkelä
2002-02-19  2:43   ` Debian User

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.10.10202181428240.3569-200000@juno \
    --to=lenz@inf.ufsc.br \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).