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
Preferred GUI Toolkit for O'Caml 3?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <Gerd.Stolpmann@d...>
Subject: Re: Preferred GUI Toolkit for O'Caml 3?
On Tue, 22 Feb 2000, skaller wrote:
>Tk is reasonably stable .. but dead. It is also sssllllloooowwwww under

It is not only slow under Windows. For example, I had an application with a
"canvas" that displayed many lines of text on the canvas (with some graphical
ornaments), and that changed the event handlers of the objects to display in
the canvas. For only some hundred lines of text, Tk took minutes to set the
canvas up, and the process cosumed about 50 MB of memory. The reason was the
algorithm by which Tk computes the tables that allow Tk to map coordinates to
the sub objects of the canvas.

The problem with Tk is that it has very powerful widgets. Often too powerful in
the wrong direction. But you must use the powerful widgets, because Tk lacks
the possibility to create your own customized widgets by combining several very
simple widgets.

I solved the problem with my canvas widget by redefining the event handler for
the whole widget, and doing the mapping from coordinates to text lines by
myself. This is possible, but you still have to use the super-duper-canvas
widget of Tk.

Tk is fine only for simple GUIs.

Gerd Stolpmann      Telefon: +49 6151 997705 (privat)
Viktoriastr. 100             
64293 Darmstadt     EMail: (privat)