Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
To answer Batkin's request for proof of speed comparion: I have no "proof" that gtk is faster other than my subjective impression of it. It seems to have "crisper" widget updates, if that makes any sense. The gtk libraries are more powerful than what you get from Tk.

As far as the gnome extension problem, you need to have the gnome libs installed if you use the gnome widgets. You don't need to run Gnome as your desktop, but it helps for full functionality of the gnome widgets. Otherwise just don't use the gnome widgets.

My favorite gtk library is the gtk-image-viewer at gtk-image-viewer

It allows mouse zooming and panning of images, try that with Tk (and the speed is smooth). Here is a little perl script to use it:

#!/usr/bin/perl ###################################################################### + # Simple image viewing application with mouse zoom and pan. ###################################################################### + use Gtk; use Gtk::ImageViewer; init Gtk; init Gtk::Gdk::Rgb; init Gtk::Gdk::Pixbuf; init Gtk::ImageViewer; if(@ARGV<1){print "Usage: imageview file\n";exit} $window = Gtk::Widget->new("GtkWindow", -type => "-toplevel", -title => "Image viewer", -delete_event => sub { print exit Gtk; } ); $image = Gtk::Widget->new("GtkImageViewer", -parent => $window, ); $file = shift; $pb = new_from_file Gtk::Gdk::Pixbuf($file); $image->set_image($pb); $window->show_all(); main Gtk;

In reply to Re: Advice on writing GUI's in Perl by zentara
in thread Advice on writing GUI's in Perl by SyN/AcK

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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: (2)
As of 2024-04-26 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found