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

I am reading up on Perl GUI's and icons and am wondering if anyone has an example of an actual somewhat simple perl GUI that I can check out just to see how it really works. Every example I have found on the web does not work or is incomplete. I am also wondering if it is possible to assign a specific icon to each perl script on a windows machine? I have read a little on this too and am under the impression that this is possible. If someone has an example of this too that would be great!! Thanx......

Replies are listed 'Best First'.
Re: Perl GUI and Icons?
by boo_radley (Parson) on Jan 25, 2003 at 13:47 UTC
Re: Perl GUI and Icons?
by {NULE} (Hermit) on Jan 25, 2003 at 15:25 UTC
    Perl/Tk is the most commonly used GUI API for Perl. It comes with a number of Perl installations by default (like ActiveState on windows). Here is a simple toy application that should give you some idea about how to code for it, but there are some other tutorials around, I'm sure.

    Haven't used the wx interface so I can't tell you how that compares. I also don't run windows so I can't tell you about the icons.

    Hope that helps.

    {NULE}
    --
    http://www.nule.org

Re: Perl GUI and Icons?
by ibanix (Hermit) on Jan 25, 2003 at 18:40 UTC
    You can also use Win32::GUI, GTK, QT and the above-mentioned Tk.

    Cheers,
    ibanix

    $ echo '$0 & $0 &' > foo; chmod a+x foo; foo;
Re: Perl GUI and Icons?
by Dr. Mu (Hermit) on Jan 25, 2003 at 20:26 UTC
    I can't speak for the other GUIs, but I do use Perl/Tk under Windows, compiling my scripts using perl2exe. And the icon thing is problematic. I've found no way to change the script "Tk" that appears in the top bar of the executing program's window, nor to replace the little yellow pearl icon appearing with the .exe file. However, it's an easy matter to create a Windows shortcut to the .exe and assign an icon to that.

    If someone has a more direct solution I'd like to hear about it, too!

      Unfortunately, the Tk that appears in the corner of the window cannot be changed as it was set at Perl/Tk's compile time (Ie: It's a part of Tk itself). As for the icon on the compiled version, you can use a program such as Micoangelo to reach into the .exe and mess with the icon. (Only problem, limited to the original resolution of the embedded icons, problem lies in the .exe structure, not a limitation of Microangelo)



      My code doesn't have bugs, it just develops random features.

      Flame ~ Lead Programmer: GMS | GMS

Re: Perl GUI and Icons?
by finni (Beadle) on Jan 25, 2003 at 21:02 UTC
    Here are build instructions for Amphetadesk, a pure Perl GUI app not written in Tk. Compiled to .exe with Perl2Exe from indigostar. I haven't read yet into it far enough for me to answer your question, but far enough to think that the documentation will do so.
      Thanx all you guys for the valuable info..