开发者

What should I use to create a Windows GUI?

I'm an experienced UNIX programmer. Now I want to develop a simple Windows application; the programming part would be very easy with almost any tool (it might be C, Perl, or something else). However, I wonder what tool to use in order to have some simple GUI around it?

I've read a litt开发者_开发百科le about Perl/TK, but understood that it's too old, and Visual Studio requirement seems a little over-kill.


WxPerl is presently the widely used GUI toolkit in the Perl community.


I'd suggest having another look at Perl/Tk. Tk is old but nothing else have managed to do what it does best: being a simple, easy to use but powerful UI library (note its strengths in that order, note also I didn't mention speed).

Unix programmers both love (simple!) and hate (ugly!) Tk. But Tk is only really ugly on Unixen because it defaults to a Motif theme (modern Tk is/should be replaced by TTk which is themeable). Under Windows, Tk uses native widgets so look and feel is not so much of an issue like it is on Unix.

As for the other suggested libraries, QT feels alien under Windows (from your user's perspective) reflecting its Linux heritage but WxWidgets looks right at home reflecting its mostly Windows heritage.


I suggest you use QT (C/C++), more info here: http://qt.nokia.com/products/platform/qt-for-windows/


If you want good portablity between operating systems, os native (or other) styling, and installation without C/C++ compilation, you can take a look at the module I've been writing, XUL::Gui on CPAN. It uses Firefox as its rendering engine. Here's a quick example:

use XUL::Gui;

display Window title=>'my window',
    H2('events!'),
    Button(
        label => 'click me',
        oncommand => sub {
            my ($self, $event) = @_;

            $self->label = 'ouch!';
        }
    );

There are more detailed examples on CPAN. Let me know if you have any questions.


For a windows GUI use Win32::GUI and possibly Win32::GUI::XMLBuilder

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜