caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Camltk and Font_Size
@ 2003-03-20 14:45 Vincent Poirriez
  2003-03-20 16:08 ` Jun P. FURUSE
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Poirriez @ 2003-03-20 14:45 UTC (permalink / raw)
  To: caml-list; +Cc: vincent.poirriez

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-20 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-20 14:45 [Caml-list] Camltk and Font_Size Vincent Poirriez
2003-03-20 16:08 ` Jun P. FURUSE

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).