Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

pp - include bitmap

by blueberryCoffee (Scribe)
on Mar 20, 2005 at 02:04 UTC ( [id://440967]=perlquestion: print w/replies, xml ) Need Help??

blueberryCoffee has asked for the wisdom of the Perl Monks concerning the following question:

Dear Wise Types,

I am developing a perl/tk that uses the Tk::DateEntry widget. When I use pp (version 0.05 - PAR version 0.75)to package the application the bitmap used by DateEntry is not found and widget is not displayed.

I have tried the -a "bitmapname" option with the bitmap in the directory as well as providing a full path. Still no bitmap found by the widget.

The source for Tk::DateEntry looks for the bitmap with  $w->Button(-bitmap => '@' . Tk->findINC("cbxarrow.xbm"))
Of course taking the -bitmap part out lets the app run but that's not really a solution.

Anyone know how to resolve something like this?

Thanks a bunch ...and then some.

Replies are listed 'Best First'.
Re: pp - include bitmap
by PodMaster (Abbot) on Mar 20, 2005 at 02:31 UTC
    How does the widget look for the bitmap? Which version of PAR do you have?

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: pp - include bitmap
by zentara (Archbishop) on Mar 20, 2005 at 13:40 UTC
    As a simple fix for your problem, why not just include the bitmap directly into your code? Another similar alternative, is to base64encode the image, and put it into a sub.
    #!/usr/bin/perl use Tk; use strict; my $mw = MainWindow->new; my @color = qw/red lightgray/; my $bits = pack("b8"x8, "...11...", "..1111..", ".111111.", "11111111", "11111111", ".111111.", "..1111..", "...11...",); $mw->DefineBitmap('indicator' => 8,8, $bits); my $label = $mw->Label(-bitmap=>'indicator', -fg=>'red')->pack; $mw->repeat(500,sub{$label->configure( -fg=>$color[0]); @color=reverse(@color); }); MainLoop;

    I'm not really a human, but I play one on earth. flash japh
      Thank you. I wish I knew of a way to do this without changing the source code but this gives me what I need and showed me how to do something I had not seen before.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://440967]
Approved by friedo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2024-04-25 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found