Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Tk::Thumbnail --> callback help

by zzspectrez (Hermit)
callback help NODE.owner = 36692 N.title = monktitlebar sitedoclet N.owner = 17342 -->
on Apr 14, 2005 at 14:32 UTC ( [id://447812]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tk::Thumbnail --> callback help
in thread Tk::Thumbnail --> callback help

>> I guess TK isn't that popular

> Now, now, don't start yelling things that are not true...

Oh... Just ignore that.. I sometimes forget sarcasm does not translate the same when written as opposed to spoken... It was ment more to be humourous... Usually responses on perlmonks seem to appear before I even submit the question.. :)

> In your second example, you seem to have found a way, ( although there is no TK::JPEG)...

TK::JPEG must be a windows Activestate thing. If I remove that use, the code will die with an error stating:

 couldn't recognize data in image file "???@@@" at c:/Perl/site/lib/Tk/Image.pm line 21."
So logicly you think I just need to send the -format option... You add the -format option then get an error:
image file format "JPEG" is not supported at C:/Perl/site/lib/Tk/Image.pm line 21.
Why this is the case I do not know... But add the use TK::JPEG and everything works fine not -format required. I'm really new to Tk so am just figuring things out.

> so what do you want to know?

EVERYTHING!! :) I'm just looking for ideas on how others would deal with the situation. It's not hard to steal acquire some code from a module and make it do what you want.. However, the all knowing powers that be will usually chastise you for reinventing the wheel and poorly at that. (Rightfully so).

So Im trying to see if there is a way to reuse Tk::Thumbnail but add the features I need to it. Seems like I should be able to make use of the label -command to just visually make it apparent which image was selected. Or even better, would be to make it do something like my second example and add checkboxes. I would think you would have to make a subclass of the initial module. I have not been able to figure out how to go about either of these ways. Maybee, I am going about it wrong, and just need to reinvent the whole thing like Im doing in my second example.

Thank you for your response and your suggestions! I wil have to look at your code ztkdb...

zzSPECTREz

Replies are listed 'Best First'.
Re^4: Tk::Thumbnail --> callback help
by zentara (Archbishop) on Apr 14, 2005 at 18:24 UTC
    Well, on Linux, it's Tk::JPEG, notice the small k. Maybe windows ignores cpaitalization.

    If you want to "customize" Tk::Thumbnails, you should read "perldoc Tk::Derived". It shows you how to do it. There is also a good article by Steven Lidie at Custom Widgets . And as always, goggle for "Tk derived widget" and "Tk custom widget", for examples.


    I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-24 23:26 GMT
Sections?
callback help NODE.owner = 36692 N.title = Sections sitedoclet N.owner = 17342 -->
Information?
callback help NODE.owner = 36692 N.title = Information sitedoclet N.owner = 17342 -->
Find Nodes?
callback help NODE.owner = 36692 N.title = Find Nodes sitedoclet N.owner = 17342 -->
Leftovers?
    callback help NODE.owner = 36692 N.title = Leftovers sitedoclet N.owner = 17342 -->
    Voting Booth?

    No recent polls found