Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Any GUI Toolkit Suggestions?

Reply
Thread Tools

Any GUI Toolkit Suggestions?

 
 
Hal Vaughan
Guest
Posts: n/a
 
      09-06-2008
I've been programming in Perl for about 7 years and in Java, with Swing, for
about 4 years, so I'm used to some GUI programming, but I have not done any
in Perl yet. I thought there was a GUI Perl programming newsgroup, but I
can't find it, so I'm asking here.

I need to write a GUI program that will basically send streams of data
through a TCP socket depending on what button is pressed in a GUI window.
The tough parts is that the user will need to be able to add more panels,
like a card layout in Java Swing. There'll be a drop-down or combo list
where the user can pick which panel they want to use or to make a new one.
Then, on each different panel, they can pick where to add buttons and
specify the size and color of the button (or possibly pick from a list of
icons to go on the button) and specify a text label that could go on the
button or under it. Of course, this can get into some trouble with layout
managers because the user would want absolute positioning and sizing of a
button and many GUI toolkits don't always use that kind of layout.

I've browsed through some toolkits along the way, while deciding if this
should be written in Perl or C++ (yes, I'm going with Perl), but
considering that the user will be specifying things like the position and
size of a button, then have the program create a button to those specs,
does anyone of suggestions or opininos on a GUI toolkit that would be
particularly flexible and good for this kind of thing? I've seen some of
what different toolkits have to say for themselves, but I'm interested in
what people who have been using toolkits have to say.

Thanks!


Hal
 
Reply With Quote
 
 
 
 
Michael Carman
Guest
Posts: n/a
 
      09-06-2008
Hal Vaughan wrote:
> I thought there was a GUI Perl programming newsgroup, but I can't
> find it, so I'm asking here.


The closest match is comp.lang.perl.tk. Strictly speaking it's a
newsgroup for Perl/Tk, but there is a little discussion about other GUI
toolkits there as well.

See perldoc -q GUI for a partial list of the toolkits you can use to
create GUIs for Perl programs.

> considering that the user will be specifying things like the position
> and size of a button, then have the program create a button to those
> specs, does anyone of suggestions or opininos on a GUI toolkit that
> would be particularly flexible and good for this kind of thing?


Tk has three different geometry managers. pack is the one used most
often, grid works better for tabular layouts, and place allows absolute
positioning. You can mix managers within a program (just don't mix them
within a frame!) which would allow you to use pack or grid for your
application while allowing users to get absolute positioning (withing
their sandbox) via place.

> I've seen some of what different toolkits have to say for themselves,
> but I'm interested in what people who have been using toolkits have
> to say.


I've used Perl/Tk for a long time. I've recently transitioned to Tkx but
can't recommend it as a starting point for newcomers.

Perl/Tk is a deep binding to Tcl/Tk. It's mature, well-documented, and
has a rich library of megawidgets. It's also stagnant and in danger of
becoming obsolete. My major complaint is that you can't get a
platform-native look with it. It's probably the most popular of the Perl
GUI options. Because of this and the excellent documentation it should
be relatively easy to get started with.

Tkx is a very thin layer over Tcl/Tk. It's shiny and new, supports all
the newer goodies in Tcl/Tk like tiled (themed) widgets but has scant
documentation and no widget libraries. It's not bad to use if you're
coming from Perl/Tk and it should be pretty easy if you're familiar with
Tcl/Tk. If not, it's probably best to stay away for now. It defers to
the Tcl documentation for most things which means that you're left with
reading Tcl and trying to figure out how to convert it to Perl.

-mjc
 
Reply With Quote
 
 
 
 
zentara
Guest
Posts: n/a
 
      09-07-2008
On Sat, 06 Sep 2008 16:25:12 GMT, Hal Vaughan <> wrote:


>The tough parts is that the user will need to be able to add more panels,
>like a card layout in Java Swing. There'll be a drop-down or combo list
>where the user can pick which panel they want to use or to make a new one.
>Then, on each different panel, they can pick where to add buttons and
>specify the size and color of the button (or possibly pick from a list of
>Thanks!


It sounds like the perfect job for the Notebook widget. Both Tk and Gtk2
have them. Tk is easier to learn, while Gtk2 is a bit more advanced and
difficult to master.


zentara

--
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html
 
Reply With Quote
 
Hal Vaughan
Guest
Posts: n/a
 
      09-08-2008
zentara wrote:

> On Sat, 06 Sep 2008 16:25:12 GMT, Hal Vaughan <> wrote:
>
>
>>The tough parts is that the user will need to be able to add more panels,
>>like a card layout in Java Swing. *There'll be a drop-down or combo list
>>where the user can pick which panel they want to use or to make a new one.
>>Then, on each different panel, they can pick where to add buttons and
>>specify the size and color of the button (or possibly pick from a list of
>>Thanks!

>
> It sounds like the perfect job for the Notebook widget. Both Tk and Gtk2
> have them. *Tk is easier to learn, while Gtk2 is a bit more advanced and
> difficult to master.


I guess there's no reason to go with Gtk2 if TK will do what I need. *The
notebook widget is basically what I'd be using. *There are other
variations, but it'd be just fine.

It occurs to me that I should do the GUI designer part of this app as a
single module, if I could, since I'm sure other people could use an app
that lets the user define buttons then attach functions to those buttons.

Thanks, all, for the help. *I went scrounging and got lucky and found a
cheap copy of "Mastering Perl/Tk" so I bought it. *I haven't checked how up
to date it was, but it was gently used and dirt cheap so I figured I might
as well get it.


Hal
 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      09-09-2008

Quoth Michael Carman <>:
> Hal Vaughan wrote:
> > I thought there was a GUI Perl programming newsgroup, but I can't
> > find it, so I'm asking here.

>
> The closest match is comp.lang.perl.tk. Strictly speaking it's a
> newsgroup for Perl/Tk, but there is a little discussion about other GUI
> toolkits there as well.
>
> See perldoc -q GUI for a partial list of the toolkits you can use to
> create GUIs for Perl programs.


Note that this particular answer was rewritten in the 5.10 version of
the FAQ. With 5.8 you can use perldoc -q tk, but the answer is not
terribly useful.

Ben

--
"Faith has you at a disadvantage, Buffy."
"'Cause I'm not crazy, or 'cause I don't kill people?"
"Both, actually."
[]
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing the Close, Min, Maximize and frame with ANY gui toolkit Daniel Folkes Python 2 02-05-2008 06:41 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Introducing CookSwing: XML to GUI toolkit asdf Java 0 08-18-2004 11:56 AM
Gui toolkit for scientific/technical apps? Junpei C++ 2 07-18-2004 08:50 PM
Standard GUI Toolkit Alessandro Pinto C++ 13 02-12-2004 10:29 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57