My suggestion is try to set the ListView column width right after the
content is displayed, with the SetColumnWidth method.

$rss_list->SetColumnWidth($_, -1) for (0 ..
$rss_list->GetColumnCount()-1);

Regards,
bungsu

On Sat, 2008-08-02 at 19:40 +0300, Octavian Rasnita wrote:
> Hi,
> 
> I am trying to create a ListView in report mode, and I want the columns to 
> have a width that can hold the biggest string from each column.
> 
> I have read that by default this happends when I use the -1 width, but all 
> the columns are created smaller than that and the text from each column is 
> shortened and then 3 dots appended to them.
> 
> Here is the code:
> 
> $rss_list = Wx::ListView->new($panel, -1, [0, 0], [660, 300], 
> wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_HRULES);
> 
> $rss_list->InsertColumn(0, "Date/Time", wxLIST_FORMAT_LEFT, -1);
> $rss_list->InsertColumn(1, "Article title", wxLIST_FORMAT_LEFT, -1);
> $rss_list->InsertColumn(2, "Source", wxLIST_FORMAT_LEFT, -1);
> $rss_list->InsertColumn(3, "Author", wxLIST_FORMAT_LEFT, -1);
> 
> After the list displays the content, if I press Control+Num pad plus, (in 
> order to make the columns larger to show the entire content), the content is 
> shown well, but I want this to happen by default.
> 
> Am I missing something, or doing something wrong?
> 
> Thank you.
> 
> Octavian
> 

Reply via email to