Re: Finding an element in a canvas ...

From: Erick Gallesio <Erick.Gallesio_at_unice.fr>
Date: Mon, 10 Jul 2000 15:16:15 +0200 (CEST)

Evrard Nicolas writes:
> The manual says that
> (widget 'find search-procedure ...)
> find all item that fits search-procedure
> and that search-procedure must be of the forms accepted by addtag
>
> what does it mean ???
> can i use a lambda to find item which has a particular tag and a
> particular type ??
>

Find uses the same way to access an object that the addtag facility.
To search someone with a given tag you can do
     (widget 'find 'withtag "tag")
To find the items which are in a given area you can do
     (widget 'find 'enclosed 0 0 100 100)

This is pure STk code, if you want to use the STklos layer, the above
example should be rewritten as
      (find-items mycanvas 'withtag "tag")
      (find-items mycanvas 'enclosed 0 0 100 100)


                -- Erick
Received on Mon Jul 10 2000 - 15:16:58 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST