Hello,
I'm trying to fill a list ctrl (report mode) with items showing an image on
column 3 (only). For all columns but col 3 I use SetImage(-1). The image is
correctly set on col 3 but I also get an empty space on col 0 corresponding
to the image size and therefore the text is not aligned to the left margin
for that column.
Does someone has an explanation for that? Should I do something else or
different?

Thank you
A.



Here is my code:


my $newListItem = Wx::ListItem->new;

$newListItem->SetText($func);
$newListItem->SetImage(-1);
$newListItem->SetId($itemCounts{$memType});
$target->InsertItem($newListItem);

# Set col 1 without image
$newListItem->SetText($tmpfunctionality);
$newListItem->SetColumn(1);
$target->SetItem($newListItem);
# Set col 2 without image
$newListItem->SetText($tmpgroup);
$newListItem->SetColumn(2);
$target->SetItem($newListItem);
# Set col 3 with image
$newListItem->SetText($mytext);
$newListItem->SetImage(1);
$newListItem->SetColumn(3);
$target->SetItem($newListItem);
# Set col 4 with image
$newListItem->SetText($mytext2);
$newListItem->SetImage(-1);
$newListItem->SetColumn(4);
$target->SetItem($newListItem);

Reply via email to