Re: Problem using Photo-image

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Wed, 11 Oct 1995 20:25:28 +0000

Tk Photo widget does not define the from option as as a "primary" (one option
that you can specify when you call make. In fact you must create a image object
and after that you can use the read subcommand with the :from option.
You must do something like
        (define x (make <Photo-Image>))
        ((Id x) 'read "The-file" :from xmin ymin xmax ymax)

Note that you can eventually do this job with an initialize function over
<Photo-Image>.
This is not very pretty and things must probably be arranged. I must admit
that support for images is very minimal for now, but I don't know which
interface must be provided for an easy access to Tk images. Images are weird
objects which are not similar to widgets (you don't pack it) nor canvas item
(they don't have parent)....
Any idea on a clean way to manipulate them in STklos would be gratly
appreciated.


                -- Erick
Received on Wed Oct 11 1995 - 20:25:29 CET

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