Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Camltk and Font_Size
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vincent Poirriez <Vincent.Poirriez@u...>
Subject: [Caml-list] Camltk and Font_Size
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