6 Einträge, 1 Seite |
$hlist->indicator('create', "$eintrag", -itemtype=> 'image', image=> $main_w->Getimage('plus'));
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::HList;
my $mw = tkinit();
my $image = $mw->Photo('img',-format => 'gif', -file => './locked.gif');
my $hlist = $mw->Scrolled('HList')->pack();
insert_hlist();
MainLoop;
sub insert_hlist{
for my $i(0..4){
$hlist->add($i);
for my $j(0..5){
my $entry = $hlist->addchild($i, -itemtype => 'imagetext',
-text => $i . '.' . $j,
-image => $image);
}
}
}
$hlist->indicator(option, $entryPath, ?args, ...?)
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
#!/usr/bin/perl
use strict;
use warnings;
use Tk;
use Tk::HList;
my $mw = tkinit();
my $image = $mw->Photo('img', -format => 'gif',
-file => './locked.gif');
my $hlist = $mw->Scrolled('HList', -indent => 16,
-indicator => 1,)->pack();
insert_hlist();
MainLoop;
sub insert_hlist{
for my $i(0..4){
my $parent = $hlist->add($i,-itemtype => 'text', -text => $i);
$hlist->indicatorCreate($parent,-itemtype => 'image', -image => $image);
for my $j(0..5){
my $entry = $hlist->addchild($i, -itemtype => 'imagetext',
-text => $i . '.' . $j,
);
$hlist->indicatorCreate($entry,-itemtype => 'image',-image => $image);
}
}
}
6 Einträge, 1 Seite |