Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Camltk: missing State Hidden constructor
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-17 (10:13)
From: Arnaud Rouanet <arnaud.rouanet@i...>
Subject: [Caml-list] Camltk: missing State Hidden constructor
Hi all,

We are developping an application (SynDEx at INRIA Rocquencourt) with
Ocaml and the Camltk library for the GUI.

In our software, the content of one of the windows, more precisely the
elements in the main canvas of the window, is automatically scaled
when the user resizes the window.  The canvas contains several "text
vertices", which consist in text overlaping a rectangle, created by
Canvas.create_text, Canvas.create_rectangle.  Initially, the rectangle
is approximately the bounding box of the text.

When scaling, for each text vertex, the rectangle is scaled down and
may become too small to contain the text, as the text itself is not
scaled.  Therefore, when the rectangle becomes too small, we want to
make the text disappear, and when it becomes big enough, make it

We wanted to use Canvas.configure_text, which accepts an State state
option, where state may only be Active | Normal | Disabled. We checked
the Tcl/Tk documentation and there is an additional "hidden" state
since version 8.3, which would be perfect for our purpose but this
doesn't appear in the current Camltk version.  It seems the previous
developper used a trick for this: in his modified version of Camltk,
the constructor Hidden has been added and then everything just works

However, we are now working with other universities and we would like
to use the standard distribution of Ocaml, which contains CamlTk (but
without the Hidden constructor).  This would also make it easier for
us to upgrade to new versions of Ocaml.

Therefore, we would like to know if there is another way to
dynamically hide the text, using the standard Camltk distribution.  It
is rather strange that the State Hidden constructor is not available
in Camltk.  Is there a good reason for this ?

Thanks for hints,

Julien Forget
Arnaud Rouanet

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: