From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA24787; Thu, 20 Mar 2003 15:50:11 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA24513 for ; Thu, 20 Mar 2003 15:50:10 +0100 (MET) Received: from pulsar.univ-valenciennes.fr (pulsar.univ-valenciennes.fr [193.50.192.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h2KEo9f18180 for ; Thu, 20 Mar 2003 15:50:09 +0100 (MET) Received: from univ-valenciennes.fr (marsiq.univ-valenciennes.fr [195.221.191.127]) by pulsar.univ-valenciennes.fr (8.12.8/jtpda-5.4) with SMTP id h2KFnJwZ358859 ; Thu, 20 Mar 2003 15:49:19 GMT Date: Thu, 20 Mar 2003 15:45:34 +0100 From: Vincent Poirriez To: caml-list@inria.fr Cc: vincent.poirriez@univ-valenciennes.fr Subject: [Caml-list] Camltk and Font_Size Message-Id: <20030320154534.33e86727.Vincent.Poirriez@univ-valenciennes.fr > X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MailScanner: Found to be clean X-Spam: no; 0.00; poirriez:01 font:99 api:01 widget:01 helloworld:01 opentk:01 foobar:01 stdout:01 closetk:01 mainloop:01 valenciennes:01 mont:01 houy:01 59313:01 lamih:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, a simple question concerning the Camltk API. What is the simplest way to specify the size of the font used in a widget. I've found Font_Size but when I try to use it, it raises Invalid_argument("Font_Size") I'll appreciate any indication. Vincent Below the program helloworld.ml modified from the examples_camltk directory of the distribution open Camltk;; (* Make interface functions available *) let top = opentk ();; (* Initialisation of the interface *) (* top is now the toplevel widget *) (* Widget initialisation *) let b = Button.create top [Text "foobar"; Command (function () -> print_string "foobar"; print_newline(); flush stdout)];; (* b exists but is not yet visible *) let q = Button.create top [Text "quit"; Font_Size 12; Command closeTk];; (* q exists but is not yet visible *) pack [b; q][] ;; (* Make b visible *) mainLoop() ;; (* User interaction*) -- courriel: vincent.poirriez@univ-valenciennes.fr tel: (33)[0]3 27 51 19 53 Université de Valenciennes et du Hainaut-Cambrésis - Le Mont Houy F-59313 Valenciennes cedex 9 - FRANCE http://www.univ-valenciennes.fr/LAMIH/ROI/poirriez ------------------- 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