Aldo Calpini wrote: > Danny, please post some code. > also take a look at listview.pl in the samples directory, > it's working this way. Here is my code. What i want is to place an image in front of "file name" . -- Danny Hoffman, Elements Internet Producties, http://www.elements.nl
use Win32::GUI; my $desktop = &GUI::GetDesktopWindow(); my $desktop_width = &GUI::Width($desktop); my $desktop_height = &GUI::Height($desktop); &init; $w->Show; &GUI::Dialog; sub init { my $w_width = 500; my $w_height = 340; $w = new Win32::GUI::DialogBox( -name => "w", -left => $desktop_width/2 - $w_width/2, -top => $desktop_height/2 - $w_height/2, -width => $w_width, -height => $w_height, -title => "Testing", ); $IL = new GUI::ImageList(16, 16, 24, 3, 10); $IL->Add("one.bmp"); $IL->Add("two.bmp"); $IL->Add("three.bmp"); $lv = new GUI::ListView( $w, -imagelist => $IL, -name => "lv", -left => 10, -top => 10, -width => 478, -height => 200, -checkboxes => 0, ); $lv->View(1); @columns = ("Name","Size","Modified","Type"); @lenght = (120,70,100,100); for($i=0; $i<=$#columns; $i++) { $lv->InsertColumn( -index => $i, -width => $lenght[$i], -text => $columns[$i], ); } $lv->InsertItem(-item => 0, -text => "file name"); $lv->SetItem(-item => 0, -subitem => 1,-text => "12345"); $lv->SetItem(-item => 0, -subitem => 2,-text => "date"); $lv->SetItem(-item => 0, -subitem => 3,-text => "pl"); } sub w_Terminate { &stop; } sub msg { &Win32::GUI::MessageBox(0, $_[0], "Informatie", 0+64); } sub error { &Win32::GUI::MessageBox(0, $_[0], "Error", 0+16); } sub stop { $w->DestroyWindow() if ($w); exit; }