|Problems? Is your data what you think it is?|
How to set background Color on bitmap when creating with DefineBitmap?by cmv (Chaplain)
|on Jul 14, 2010 at 16:36 UTC||Need Help??|
cmv has asked for the
wisdom of the Perl Monks concerning the following question:
This should be simple, but I can't seem to get it...
I want to create a bitmap with a particular background color. Here's how I create the bitmap:
Where do I specify -background=>'red' in the above code?
DefineBitmap doesn't return anything, so I can't access it that way and it doesn't allow any options on the command line either.
How do I do this?
Update:Found some additional (hopefully helpful) information from the activestate manuals as follows:
When a bitmap image is created, Tk also creates a new command whose name is the same as the image. This command may be used to invoke various operations on the image. It has the following general form:
imageName option ?arg arg ...?
Option and the args determine the exact behavior of the command. The following commands are possible for bitmap images:
imageName cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the image create bitmap command.
Unfortunately, none of these seem to work: