.

, :

@group = $radiobutton->button_group();

, :

$radiobutton->button_set_group( @group );

#!/usr/bin/perl -w use Gtk; use strict; set_locale Gtk; init Gtk; my $false = 0; my $true = 1; my $window; my $box1; my $box2; my $button; my $separator; $window = new Gtk::Window( "toplevel" ); $window->signal_connect( "delete_event", sub { Gtk->exit( 0 ); } ); $window->set_title( "Radio Buttons" ); $window->border_width( 0 ); $box1 = new Gtk::VBox( $false, 0 ); $box1->show(); $box2 = new Gtk::VBox( $false, 10 ); $box2->border_width( 10 ); $box1->pack_start( $box2, $false, $false, 0 ); $box2->show(); $window->add( $box1 ); $button = new Gtk::RadioButton( "button 1" ); $box2->pack_start( $button, $false, $false, 0 ); $button->show(); $button = new Gtk::RadioButton( "button 2", $button ); $button->set_active( $true ); $box2->pack_start( $button, $true, $true, 0 ); $button->show(); $button = new Gtk::RadioButton( "button 3", $button ); $box2->pack_start( $button, $true, $true, 0 ); $button->show(); $button = new Gtk::RadioButton( "button 4", $button ); $box2->pack_start( $button, $true, $true, 0 ); $button->show(); $separator = new Gtk::HSeparator(); $box1->pack_start( $separator, $false, $false, 0 ); $separator->show(); $box2 = new Gtk::VBox( $false, 10 ); $box2->border_width( 10 ); $box1->pack_start( $box2, $false, $true, 0 ); $box2->show(); $button = new Gtk::Button( "Close" ); $button->signal_connect( "clicked", sub { Gtk->exit( 0 ); } ); $box2->pack_start( $button, $true, $true, 0 ); $button->can_default( $true ); $button->grab_default(); $button->show(); $window->show(); main Gtk; exit( 0 );

, - ( 4- ): ( )