use Tk;
use Tk::BrowseEntry;
my $mw = new MainWindow;
$mw->title ("Test-GUI");
my $label1 = $mw->Label (-text=>"Test-Gui", -font => [-size => 12, -weight => "bold"]);
my $label2 = $mw->Label (-text=>"Auswahl", -height=>3, -font => [-size => 10, -weight => "bold"]);
my $label3 = $mw->Label (-text=>"Browse", -font => [-size => 10, -weight => "bold"]);
my $brows = "Alle";
my @radiobuttons = (
'Auswahl1',
'Auswahl2',
'Auswahl3',
'Auswahl4',
);
my $radio_input = 0;
my $frm_auswahl = $mw -> Frame();
my $auswahl1 = $frm_auswahl -> Radiobutton(-text=>"Auswahl1",
-value=>"a1", -variable=>\$portal);
my $auswahl2 = $frm_auswahl -> Radiobutton(-text=>"Auswahl2",
-value=>"a2", -variable=>\$portal);
my $auswahl3 = $frm_auswahl -> Radiobutton(-text=>"Auswahl3",
-value=>"a3", -variable=>\$portal);
my $auswahl4 = $frm_auswahl -> Radiobutton(-text=>"Auswahl4",
-value=>"a4", -variable=>\$portal);
my $browse = $mw->BrowseEntry(-variable => \$brows);
my $button1= $mw->Button(-text=>"Beenden", -width => 20, -height => 2,-command=>\&cmd_button);
my $button2= $mw->Button(-text=>"Weiter", -width => 20, -height => 2);
my $button3= $mw->Button(-text=>"Editor", -width => 10, -height => 1);
$label1->grid (-row=>0, -column=>0, -columnspan=>6);
$label2->grid (-row=>2, -column=>0, -columnspan=>2, -sticky => "w");
$label3->grid (-row=>2, -column=>2, -columnspan=>2);
$auswahl1 -> grid(-row=>3,-column=>0, -sticky => "w");
$auswahl2 -> grid(-row=>4,-column=>0, -sticky => "w");
$auswahl3 -> grid(-row=>5,-column=>0, -sticky => "w");
$auswahl4 -> grid(-row=>6,-column=>0, -sticky => "w");
$frm_auswahl -> grid(-row=>3,-column=>0, -columnspan=>2, -sticky => "w");
$browse -> grid(-row=>3,-column=>2, -columnspan=>2, -sticky => "n");
$button1->grid(-row=>7, -column=>0, -columnspan=>2, -sticky=>"w");
$button2->grid(-row=>7, -column=>4, -columnspan=>2, -sticky=>"e");
$button3->grid(-row=>3, -column=>4, -columnspan=>2, -sticky => "n");
sub cmd_button
{
$mw->messageBox (-message=>"Progamm wird beendet!");
exit;
}
MainLoop;