Re: Button with a Pixmap?

From: Andrew Dorrell <andrewd_at_ee.uts.edu.au>
Date: Tue, 30 Jul 1996 11:15:38 +1000 (EST)

>
>
> Can I display a pixmap (or another color format) on a button? I can
> do a bitmap, but I'd like to add a bit of color.
>

You need to use a Tk image...

(require "pixmap") ; At least in 3.0b2 pixmap is an extension
(define button (make <Button>
                     :parent p
                     :command (lambda() (format #t "Button press.\n"))
                     :image (image 'create 'pixmap :file "/path/to/pixmap")))
(pack button)

Regards,
-- 
------------------------------------------------------------------------------
Mr Andrew Dorrell
School of Electrical Engineering                 *
University of Technology, Sydney                     *
PO Box 123                                     *
Broadway NSW 2007                                   .  
AUSTRALIA
                                                    *       /---\  Whoo?
Phone:   61 2 330 2395                                      (o o) /
Fax:     61 2 330 2435                                      ( : )  
email:   andrewd_at_ee.uts.edu.au                               ^ ^     
    OR   dorrell_at_ihf.uts.edu.au
------------------------------------------------------------------------------
Received on Tue Jul 30 1996 - 03:17:19 CEST

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