18
BEGIN { plan tests => 3 }
18
BEGIN { plan tests => 5 }
20
20
my $mw = MainWindow->new;
21
21
$mw->geometry("+10+10");
24
24
my $cb = $mw->Checkbutton->pack;
25
is(ref $cb, "Tk::Checkbutton");
26
is($cb->{Value}, undef);
25
is(ref $cb, "Tk::Checkbutton", "It's a checkbutton");
26
is($cb->{Value}, undef, "No value at beginning");
28
is($cb->{Value}, 1, "... but now");
33
my $f = $mw->Frame->pack(-fill => 'x');
35
$f->Button(-text => "Repeat & ridge",
36
-image => $mw->Photo(-file => Tk->findINC("Xcamel.gif")),
38
-overrelief => 'ridge',
40
-repeatinterval => 100,
41
-command => sub { $incr++ },
42
)->pack(-side => 'left');
43
$f->Label(-text => "increments:")->pack(-side => 'left');
44
$f->Label(-textvariable => \$incr)->pack(-side => 'left');
45
pass("Button with new options");
50
my $f = $mw->Frame->pack(-fill => 'x');
51
$f->Label(-state => "normal", -text => "normal: red on white",
52
-background => 'white', -foreground => 'red')->pack(-fill => 'x');
53
$f->Label(-state => "active", -text => "active: green on white",
54
-activebackground => 'white', -activeforeground => 'green')->pack(-fill => 'x');
55
$f->Label(-state => "disabled", -text => "disabled: blue on white",
56
-background => 'white', -disabledforeground => 'blue')->pack(-fill => 'x');
57
pass("Label with states");
60
if ($ENV{PERL_INTERACTIVE_TEST}) {