http://www.perlmonks.org?node_id=1025639


in reply to Re^3: Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings?
in thread Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings?

James: thank you for this serious work.
I ran your program and changed it a bit here and there. It seems that with the vanilla installation (I have DWIM Perl 5.14.2 on Windows 7):

$self->{list_control}->SetBackgroundColour(wxWHITE); $self->{list_control}->SetTextColour(wxBLUE); my $f_list = Wx::Font->new(12, -1, wxNORMAL, wxBOLD, 0, 'Arial'); $self->{list_control}->SetFont($f_list);

works as intended on the list items, but on columns, it will let you set/change the font, but not foreground or background colors. (BTW, how do I check the wxWidgets version?)

I don't feel like recompiling the library, - sounds very scary to me, and also, sometimes I run the programs on other pc's, so this will necessitate recompiling on all of them - that's not practical.

It seems I have no choice but to venture into the Grid (shudder), (where I'm encountering another set of problems, which I'll report soon).

Many thanks for your dedicated work - Helen

  • Comment on Re^4: Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings?
  • Download Code

Replies are listed 'Best First'.
Re^5: Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings?
by jmlynesjr (Deacon) on Mar 27, 2013 at 15:26 UTC

    When I run the code that I posted, on my Ubuntu 10.10, CitrusPerl 5.16, wxWidgets 2.8.12 setup, the $self->{list_control}->SetTextColour(wxBLUE); does change the column header text to blue. The column background text always stays grey. This seems to be almost everything that you needed to do. Are you not seeing the header text color change? I can search for wxWidgets in my Synaptic package manager to see the version number(of my original install, the CitrusPerl install is a newer version).

    You could try a CitrusPerl install. It was quick and easy for me. You could even try the CitrusPerl developmental 2.9.4 wxWidgets version and see if this issue might have been fixed.

    I will cross-post a question to the mail-list and see if anyone over there knows the status.

    James

    There's never enough time to do it right, but always enough time to do it over...

Re^5: Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings?
by Anonymous Monk on Mar 27, 2013 at 07:49 UTC