Trivial Newbie Question (Newbie) 
Author Message
 Trivial Newbie Question (Newbie)

Please excuse this trivial newbie question.  I am having difficulty
accessing the standard bitmaps (using TclPro 8.2) in commands like:

label .bitmap -bitmap $tk_library/demos/bitmaps/flagdown

What gives?  Also, if I want to include other images (e.g., .gif,
.jpg), how can I do it?

Thanks.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 07 Apr 2003 03:00:00 GMT  
 Trivial Newbie Question (Newbie)

Quote:

> Please excuse this trivial newbie question.  I am having difficulty
> accessing the standard bitmaps (using TclPro 8.2) in commands like:
> label .bitmap -bitmap $tk_library/demos/bitmaps/flagdown
> What gives?  Also, if I want to include other images (e.g., .gif,
> .jpg), how can I do it?

For a built-in bitmap:

    label .bitmap -bitmap hourglass

For a bitmap in a file:


                $tk_library demos images flagdown.bmp ]

For any others images:

    set im [ image create photo -file [ file join \
                $tk_library demos images earth.gif ] ]
    label .bitmap -image $im

By default, 'photo' option for the image command handles GIF
and PPM/PGM format (see image and photo entries in the Tk man).
The 'bitmap' option for the image command handles bitmap format
(see image and bitmap entries in the Tk man).

You could use the Imp (1.2?) extension to handle many others
format, like JPEG.


ages of Tk, and still works.

Hope it helps.

Jo?l Saunier

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 08 Apr 2003 03:00:00 GMT  
 Trivial Newbie Question (Newbie)

Quote:


>> Please excuse this trivial newbie question.  I am having difficulty
>> accessing the standard bitmaps (using TclPro 8.2) in commands like:
>> label .bitmap -bitmap $tk_library/demos/bitmaps/flagdown
>> What gives?  Also, if I want to include other images (e.g., .gif,
>> .jpg), how can I do it?

> For a built-in bitmap:

>     label .bitmap -bitmap hourglass

How can you get the list of existing bitmaps? OI though flgdown was a valid
bitmap but it ain't.

L

--
MY EMAIL ADDRESS HAS CHANGED --> UPDATE YOUR ADDRESSBOOK

Laurent Duperval                 "Montreal winters are an intelligence test,
                                         and we who are here have failed it."

Penguin Power!         ***Nothing I say reflects the views of my employer***



Tue, 08 Apr 2003 03:00:00 GMT  
 Trivial Newbie Question (Newbie)


Quote:

> > For a built-in bitmap:

> >     label .bitmap -bitmap hourglass

> How can you get the list of existing bitmaps? OI though flgdown
> was a valid bitmap but it ain't.

I think the short answer is "you can't".
I think the long answer is "read the source, luke".

I don't know. All I have do was to check the "bitmap.tcl" file in
the demo part of the Tk library.

Jo?l Saunier.

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 08 Apr 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. possibly trivial newbie list/array question

2. Newbie Question (Was: Newbie Question...)

3. Newbie Newbie, we are all Newbie to something

4. Not a newbie, but a newbie question...

5. Does a variable exist? NEWBIE NEWBIE NEW

6. Newbie wants newbie friend

7. newbie BRAND newbie!

8. Newbie Pythom + Newbie Com = Way confussed

9. Newbie Question: Realbasic Question

10. Yet another question on system calls(newbie question)

11. question on event-generated errors (was Re: newbie TkCon question)

12. Haskell Operator Overloading. (Very) trivial newbie question.

 

 
Powered by phpBB® Forum Software