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
Labltk: Canvas item -state hidden
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matt Gushee <mgushee@h...>
Subject: Re: [Caml-list] Labltk: Canvas item -state hidden
Dirk Thierbach wrote:

 > Is there any reason that Labltk doesn't allow to configure canvas items
 > with -state hidden (or with any state at all)?

Probably just an oversight. Since Labltk is poorly documented and not 
very widely used, there are few people in a position to find the bugs.

 > After wading through the interface information, I came up with the 
following workaround:

Actually, that's not where you want to make the change. The code you 
modified was automatically generated from a file called Widgets.src, 
which you will find in $OCAML_SOURCE/otherlibs/labltk.

What you need to do is to open up Widgets.src and find the blocks that 
start with

   subtype option(arc) {

and so on ... there's one for each canvas item type. Just add "State" to 
the options in each of those blocks. Once you see it it should be pretty 

 > But of course it would be nicer if Labltk would already support it :-)

I'd suggest you make the modifications as I described, rebuild OCaml and 
make sure it works, then submit your request (with a patch or at least a 
description of the fix) to the OCaml bug tracker. It may take a while, 
but unless there's some good reason for not including that option (can't 
imagine what reason there would be), it should eventually get into the 

Matt Gushee
Englewood, CO, USA