#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::Pane;
# Zuerst wieder ein Hauptfenster und zwei Frames:
my $mw = MainWindow->new(-title => "CheBa 0.001 beta");
$mw -> resizable ('0','0'); # verhindert das 'Groesserziehen'
$mw -> geometry ('+20+20');
my $frame = $mw->Frame(-height =>500,
-width =>600,
);
my $frame2 = $mw->Frame();
my $eingabe="";
# Menubuttons
my $m_file = $frame2->Button(-text => "Datei holen",
-underline => 0,
-command => [\&get, "get"],
);
my $m_opti = $frame2->Button(-text => "Alte Datei",
-underline => 0,
-command => [\&show, "show"],
);
my $m_help = $frame2->Button(-text => "Hilfe",
-underline => 0,
-command => [\&help, "help"],
);
# Jetzt packen wir wieder alles zusammen:
$m_file->pack(-side => 'left',
-expand => 0,
-fill => 'x',
);
$m_opti->pack(-side => 'left',
-expand => 0,
-fill => 'none',
);
$m_help->pack(-side => 'left',
-expand => 0,
-fill => 'none',
);
$frame2->pack(-side => 'top',
-expand => 0,
-fill => 'x',
);
my $scrlist = $frame->Scrolled("Pane",
-textvariable => \$eingabe,
-height=>15,
-width =>45,
-scrollbars=>'e');
$scrlist->pack;
my $help_text = $frame->Scrolled("Pane",
-textvariable => \$eingabe,
-height=>15,
-width =>45,
-scrollbars=>'e');
$help_text->pack;
$frame-> pack(-side => 'top',
-expand => 1,
-fill => 'both',
);
# Der Exit Button:
my $fbut = $mw->Frame()->pack();
my $bxit = $fbut->Button(-text => 'Exit',
-command => [$mw => 'destroy'],
)
->pack(-side => 'left',
-expand => 0,
-fill => 'none',
);
MainLoop();
sub get {
} # sub file
sub show {
open(ACCESION_START, "</home/Sebastian/bioinf/scripte/bioperl/accessions_start") || die "konnte accessions_start Liste nicht öffnen\n";
while(<ACCESION_START>){
#my $new_acc=substr($_,0,9);
#$eingabe.=$_."\n";
$eingabe.=$_."\n";
}
} # sub file
sub help {
$eingabe="Mit diesem Tool wird die\n....";
} # sub file