From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: Vincent.Barichard@info.univ-angers.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] self widget call in camltk
Date: Thu, 02 Oct 2003 08:54:55 +0900 [thread overview]
Message-ID: <20031002085455Y.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <3F7AC194.000003.04488@lanfeust>
From: "Vincent Barichard" <Vincent.Barichard@info.univ-angers.fr>
> I use labltk to build a gui for a programm where I need that a button b1 can
> enable another button b2 and disable itself. For example :
>
> let b1 = Button.create top ~text:"b1" ~state:`Disabled
> ~command:(fun _ -> Button.configure b2 ~state:`Active;
> Button.configure b1 ~state:`Disabled);;
> let b2 = Button.create top ~text:"b2"
> ~command:(fun _ -> Button.configure b1 ~state:`Active;
> Button.configure b2 ~state:`Disabled);;
That's pretty classical. You can add the command after creating the
button:
let b1 = Button.create top ~text:"b1" ~state:`Disabled
let b2 = Button.create top ~text:"b2"
let () =
Button.configure b1 ~command:(...);
Button.configure b2 ~command:(...)
Jacques Garrigue
-------------------
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
prev parent reply other threads:[~2003-10-01 23:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-01 11:59 Vincent Barichard
2003-10-01 23:54 ` Jacques Garrigue [this message]
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=20031002085455Y.garrigue@kurims.kyoto-u.ac.jp \
--to=garrigue@kurims.kyoto-u.ac.jp \
--cc=Vincent.Barichard@info.univ-angers.fr \
--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).