in reply to TK setPalette Not working under Linux Gnome
Ugly.... but demonstrates it works.
#!/usr/bin/perl use warnings; use strict; use Tk; my $types = [['Format Perl', '.pl']]; my $mw = new MainWindow ( ) ; $mw->setPalette(background=>'black', foreground=>'white'); my @files; $mw -> Button ( -text => 'Select File ' , -command => \&open_it )-> pack(-padx=>5, -pady=>5) ; MainLoop ( ) ; sub open_it { my $names = $mw ->getOpenFile ( -initialdir => '.', -filetypes => $types, -multiple => 1) ; foreach my $file( @{$names} ){ print "Result ", $file, "\n" ; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TK setPalette Not working under Linux Gnome
by avo (Pilgrim) on Jun 24, 2007 at 20:36 UTC |