Thread HList: Indicator mit eigenem Bild (5 answers)
Opened by KunoKugel at 2006-10-23 00:20

renee
 2006-10-23 11:45
#45885 #45885
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Geht bei indicator genauso:
Code: (dl )
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);
}
}
}
\n\n

<!--EDIT|renee|1161589606-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread HList: Indicator mit eigenem Bild