5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/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");
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"],
);
####################################
####################################
### Hier beginnt das Drama : )
####################################
####################################
my $pane = $frame->Scrolled("Label",
-scrollbars => 'oe',
-textvariable => \$eingabe,
-height => 20,
-width =>50,
-anchor => 'nw',
-background => "yellow",
-relief => "ridge",
-borderwidth => 2,
-padx => '2m',
-pady => '2m',
);
# 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',
);
$pane->pack(-side => 'top',);
$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.=$new_acc."\n";
}
} # sub file
sub help {
$eingabe="Mit diesem Tool wird die\n....";
} # sub file
QuoteCan't set -textvariable to `SCALAR(0x82b6d34)' for Tk::Pane=HASH(0x8408b74): Can't set -textvariable to `SCALAR(0x82b6d34)' for Tk::Frame=HASH(0x8427928): Bad option `-textvariable' at /usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Tk/Configure.pm line 46.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/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
5 Einträge, 1 Seite |