#!/usr/bin/perl -w use strict; use Tk; use Tk::HList; my $main = tkinit(); my $hlist = $main->HList(-columns => 3)->pack(-fill => 'both', -expand => 1); my $row = 0; #irgendwas hinzufuegen for my $col (0..2) { $hlist -> add($row); $hlist->itemCreate($row, $col, -itemtype => 'text', -text => "row: $row col: $col"); $row++; } #ausgabe $main -> Button(-text => 'Print', -command => sub{print_out()})->pack; MainLoop; sub print_out { #2,2 is letzte zeile, letzte spalte #1,1 is zweite zeile, zweite spalte usw my $outside = $hlist->itemCget(2, 2, -text); print $outside ."\n"; }