develooper Front page | perl.wxperl.users | Postings from February 2013

Setting background color on column heading in Wx::ListCtrl

From:
Dave Hayes
Date:
February 5, 2013 19:32
Subject:
Setting background color on column heading in Wx::ListCtrl
Message ID:
51115E46.7080505@jetcafe.org
How do I achieve this in 2.8.12? Right now I'm doing this:

   $listctrl->InsertColumn($col, $heading);
   setColumnHeader($col, $heading);

   sub setColumnHeader {
      my ($listctrl, $col, $heading, $bgcolor, $font) = @_;

      my $li = Wx::ListItem->new;
      $li->SetText($heading);
      $li->SetBackgroundColour($bgcolor);
      $li->SetFont($font);
      $listctrl->SetColumn($col, $li);
   }

and then when I want to change the color via event, I just call 
setColumnHeader() in the event.

At the moment, this does nothing to affect the look of the column header.

Thanks in advance. :D
-- 
Dave Hayes - Consultant - Altadena CA, USA - dave@jetcafe.org
 >>>> *The opinions expressed above are entirely my own* <<<<

Tie two birds together.

They will not be able to fly, even though they have four
wings.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About