Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: How to set background Color on bitmap when creating with DefineBitmap?

by cmv (Chaplain)
on Jul 14, 2010 at 21:40 UTC ( #849641=note: print w/ replies, xml ) Need Help??


in reply to Re: How to set background Color on bitmap when creating with DefineBitmap?
in thread How to set background Color on bitmap when creating with DefineBitmap?

Here's a quick example:

use strict; use warnings; use Tk; my $top = MainWindow->new(); my $arrowDnBits = pack("b8" x 5, "........", ".111111.", "..1111..", "...11...", "........" ); $top->DefineBitmap('arrowDn' => 8, 5, $arrowDnBits); $top->Button(-bitmap=>'arrowDn')->pack(-side=>'left'); MainLoop();
Note: It is possible to set -background=>'red' when you create the button (which will get the button code to go and set the bitmap background for you), but that is not what I want. I'm trying to figure out how to set the bitmap -background directly, or possibly another bitmap option like -data.


Comment on Re^2: How to set background Color on bitmap when creating with DefineBitmap?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://849641]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (14)
As of 2014-07-10 20:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (216 votes), past polls