So if I want to create GUI using perl what is advisable to use? Tcl or
Tk or Tkx?
Add wxPerl to the list of the GUI toolkits and choose one (or more),
based on the features that any of the libraries provides.
One can make a choice only after he learns at least at a basic
level how to use them, and what are the differences between the widget
capabilities. There are subtle, but important differences between the
implementations, for example Tk::StatusBar labels can have color text
and can be centered, but in wxPerl that's not yet implemented (at
least in wxwidgets 2.8.11. This is not so important for the
functionality of the application, but you got the point ...), on the
other hand wxPerl has other advantages over PerlTk, including the fact
that it is developed actively.
What I mean is that you can implement a MVC pattern, an use any of the
toolkits to create the view part of the application, you even can
experiment with more than one toolkit. I have a experimental project of a database application on GitHub that uses PerlTk and wxPerl for the View part of the implementation (https://github.com/stefansbv/Tpda3)
Regards, Stefan
| [reply] |
for example Tk::StatusBar labels can have color text and can be centered, but in wxPerl that's not yet implemented (at least in wxwidgets 2.8.11. This is not so important for the functionality of the application, but you got the point ...),
Your overall point is a good one, but Tk::StatusBar is a poor example since it is a pure-perl widget, and wxStatusBar is the interface to the underlying systems native status bar
You can get color text in a wxStatusbar, see How do I destroy a control after its creation in wxPerl? Or you can create the equivalent of Tk::StatusBar for wxPerl (and call it Wx::Perl::StatusBar ) by copying StatusBar.pm, and swapping Tk::Frame for Wx::Frame, Tk::ProgressBar for Wx::ProgressDialog, Tk::Label for Wx::StaticText, in about 10 minutes :)
| [reply] |