[TK] sous Mac, Linux BSD ou autres
Le
perlgenome
Bonjour,
J'aurais besoin que des personnes possédant un OS MAC ou Linux BSD
puisse m'exécuter ce code Tk sur son PC ou serveur afin de me donner
le résultat obtenu. J'en ai besoin pour mettre à jour un module sur le
CPAN.
Merci aux amis perléens.
NB : D'ailleurs, sur un OS autre que Windows, MAC et BSD m'intéresse
également. Merci
Voici le code en question
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = new MainWindow();
print "OS : ",$^O,"";
my $active = $mw->Button( -text => 'active' )->pack(qw/-pady 20/);
print "Bouton Actif";
print "-activeforeground : ", $active->cget( -activeforeground ),
"";
print "-activebackground : ", $active->cget( -activebackground ),
"";
print "";
print "Bouton Normal";
$mw->Button(
-text => 'normal',
-state => 'normal',
)->pack(qw/-pady 20/);
print "-foreground : ", $active->cget( -disabledforeground ), "";
print "-background : ", $active->cget( -background ), "";
print "";
print "Bouton Desactive";
my $disabled = $mw->Button(
-text => 'disabled normal',
-state => 'disabled',
)->pack(qw/-pady 20/);
print "-disabledforeground : ", $active->cget( -disabledforeground ),
"";
print "-background : ", $active->cget( -background ),
"";
print "";
MainLoop();
Genomart
J'aurais besoin que des personnes possédant un OS MAC ou Linux BSD
puisse m'exécuter ce code Tk sur son PC ou serveur afin de me donner
le résultat obtenu. J'en ai besoin pour mettre à jour un module sur le
CPAN.
Merci aux amis perléens.
NB : D'ailleurs, sur un OS autre que Windows, MAC et BSD m'intéresse
également. Merci
Voici le code en question
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
my $mw = new MainWindow();
print "OS : ",$^O,"";
my $active = $mw->Button( -text => 'active' )->pack(qw/-pady 20/);
print "Bouton Actif";
print "-activeforeground : ", $active->cget( -activeforeground ),
"";
print "-activebackground : ", $active->cget( -activebackground ),
"";
print "";
print "Bouton Normal";
$mw->Button(
-text => 'normal',
-state => 'normal',
)->pack(qw/-pady 20/);
print "-foreground : ", $active->cget( -disabledforeground ), "";
print "-background : ", $active->cget( -background ), "";
print "";
print "Bouton Desactive";
my $disabled = $mw->Button(
-text => 'disabled normal',
-state => 'disabled',
)->pack(qw/-pady 20/);
print "-disabledforeground : ", $active->cget( -disabledforeground ),
"";
print "-background : ", $active->cget( -background ),
"";
print "";
MainLoop();
Genomart

Poser une question


perlgenome
Sur Linux (Ubuntu 10.10, perl 5.10.1, Tk 804.029) :
OS : linux
Bouton Actif
-activeforeground : Black
-activebackground : #ececec
Bouton Normal
-foreground : #a3a3a3
-background : white
Bouton Desactive
-disabledforeground : #a3a3a3
-background : white
--
Paul Gaborit - Perl en français -
Merci Paul,
J'ai pu tester ce programme sur Windows, Linux Suse, Debian, plus
Ubuntu pour toi. Il me reste Mac et peut être d'autres OS si possible.
Djibril
MacOSX 10.6.4, perl 5.10.0, Tk 804.029-19_x86_64 (installé via fink)
OS : darwin
Bouton Actif
-activeforeground : Black
-activebackground : #ececec
Bouton Normal
-foreground : #a3a3a3
-background : #d9d9d9
Bouton Desactive
-disabledforeground : #a3a3a3
-background : #d9d9d9
--
XAv
In your pomp and all your glory you're a poorer man than me,
as you lick the boots of death born out of fear.
(Jethro Tull)
Ayant fait une petite erreur dans mon programme je vous recolle mon
programme a testé chez vous, il y a le font en plus.
Merci beaucoup.
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Data::Dumper;
my $mw = new MainWindow();
print "OS : ", $^O, "nn";
my $active = $mw->Button( -text => 'active' )->pack(qw/-pady 20/);
print "Bouton Actifn";
print "-activeforeground : ", $active->cget( -activeforeground ),
"n";
print "-activebackground : ", $active->cget( -activebackground ),
"n";
print "-font : ", Dumper $active->cget( -font ), "n";
print "n";
print "Bouton Normaln";
my $normal = $mw->Button(
-text => 'normal',
-state => 'normal',
)->pack(qw/-pady 20/);
print "-foreground : ", $normal->cget( -foreground ), "n";
print "-background : ", $normal->cget( -background ), "n";
print "-font : ", Dumper $normal->cget( -font ), "n";
print "n";
print "Bouton Desactiven";
my $disabled = $mw->Button(
-text => 'disabled normal',
-state => 'disabled',
)->pack(qw/-pady 20/);
print "-disabledforeground : ", $disabled->cget( -
disabledforeground ), "n";
print "-background : ", $disabled->cget( -
background ), "n";
print "-font : ", Dumper $disabled->cget( -font ), "n";
print "n";
MainLoop;
OS : darwin
Bouton Actif
-activeforeground : Black
-activebackground : #ececec
-font : $VAR1 = bless( do{(my $o = 'Helvetica -12 bold')}, 'Tk::Font'
);
$VAR2 = '
';
Bouton Normal
-foreground : Black
-background : #d9d9d9
-font : $VAR1 = bless( do{(my $o = 'Helvetica -12 bold')}, 'Tk::Font'
);
$VAR2 = '
';
Bouton Desactive
-disabledforeground : #a3a3a3
-background : #d9d9d9
-font : $VAR1 = bless( do{(my $o = 'Helvetica -12 bold')}, 'Tk::Font'
);
$VAR2 = '
';
Pas de quoi !
--
XAv
In your pomp and all your glory you're a poorer man than me,
as you lick the boots of death born out of fear.
(Jethro Tull)