Tk::FlatRadiobutton - an alternative radiobutton implementation for perl/Tk


Tk-FlatCheckbox documentation Contained in the Tk-FlatCheckbox distribution.

Index


Code Index:

NAME

Top

Tk::FlatRadiobutton - an alternative radiobutton implementation for perl/Tk

SYNOPSIS

Top

    use Tk::FlatRadiobutton;
    $mw->FlatRadiobutton->pack;

DESCRIPTION

Top

Tk::FlatRadiobutton is an alternative radiobutton implementation. Please refer to the Tk::FlatCheckbox documentation for a list of valid options.

SEE ALSO

Top

Tk::FlatCheckbox, Tk::Radiobutton

AUTHOR

Top

Slaven Rezi107 <srezic@cpan.org>

COPYRIGHT

Top


Tk-FlatCheckbox documentation Contained in the Tk-FlatCheckbox distribution.

# -*- perl -*-

#
# $Id: FlatRadiobutton.pm,v 1.3 2007/10/19 20:55:49 eserte Exp $
# Author: Slaven Rezic
#
# Copyright (C) 2001,2007 Slaven Rezic. All rights reserved.
# This package is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#
# Mail: srezic@cpan.org
# WWW:  http://www.rezic.de/eserte/
#

package Tk::FlatRadiobutton;
use base qw(Tk::FlatCheckbox);
Tk::FlatCheckbox->VERSION(0.05);

use strict;
use vars qw($VERSION @ISA);
Construct Tk::Widget 'FlatRadiobutton';

$VERSION = '0.07';

sub Populate {
    my($w,$args) = @_;

    if ($args->{-offvalue}) {
	die "-offvalue is not allowed in " . __PACKAGE__;
    }
    if ($args->{-onvalue}) {
	warn "-onvalue should not be used, but rather -value";
    }

    $w->SUPER::Populate($args);

    $w->ConfigSpecs(-value => '-onvalue');
}

sub invoke {
    my $w = shift;
    return if $w->{Configure}{'state'};
    $w->SUPER::invoke(@_);
}

1;

__END__