Limbic~Region has asked for the wisdom of the Perl Monks concerning the following question:
After about 4 years, I have finally crossed "learn Tk" off my to-do list. I was commenting in freenode's #perl that it looked horrible and I would be moving to another framework when Khisanth asked why don't I use one of the Win32 themes using Tile widgets. The screen shots were impressive, so I figured I would give it a try.
I contacted the author of Tk and received a quick reply that Tile support is scheduled for the next release but that there was no timetable for that. I searched a bit and read something where Tkx provided access to more Tk/tcl stuff and I decided to give it a try. Once I read through the tutorial and the glaze on my eyes wore off, I emailed the author. Though I received a timely response, miscommunication on my part didn't result in the answer I was hoping for.
I pressed on without the first clue what I was doing and came up with the following:
#!/usr/bin/perl use strict; use warnings; use Tkx; Tkx::package_require('tile'); Tkx::tile__setTheme('xpnative'); my $mw = Tkx::widget->new("."); $mw->new_ttk__button( -text => 'Hello, world', -command => sub { $mw->g_destroy; }, )->g_pack; Tkx::MainLoop();
Yay! It works and looks good on Win32. Unfortunately, it seems like almost none of the knowledge I gained while learning Tk is transferrable to Tkx.
Does anyone have any hints on making Tk on Win32 both easy and pretty? I plan on learning other cross-platform frameworks such as Wx in the future so suggesting them here is not useful (to me).
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do you make Tk look good?
by samtregar (Abbot) on Jul 15, 2008 at 22:51 UTC | |
by Joost (Canon) on Jul 15, 2008 at 23:06 UTC | |
by Limbic~Region (Chancellor) on Jul 15, 2008 at 23:46 UTC | |
by renodino (Curate) on Jul 16, 2008 at 00:54 UTC | |
by samtregar (Abbot) on Jul 16, 2008 at 02:45 UTC | |
by Limbic~Region (Chancellor) on Jul 16, 2008 at 12:30 UTC | |
Re: How do you make Tk look good?
by zentara (Archbishop) on Jul 16, 2008 at 12:48 UTC | |
by Anonymous Monk on Jul 16, 2008 at 14:37 UTC | |
by zentara (Archbishop) on Jul 16, 2008 at 14:45 UTC | |
by cmv (Chaplain) on Jul 17, 2008 at 21:09 UTC | |
by zentara (Archbishop) on Jul 18, 2008 at 11:44 UTC |