The wxBook states, under the wxListItem class, "wxListItem is a class you can use to insert an item, set an item's properties, or retreive information from an item"..."Other functions set various additional visual properties: SetAlign, SetBackgroundColour, SetTextColour, and SetFont. These don't require a mask flag be specified. All wxListItem functions have equivalent accessors prefixed by Get for retrieving information about an item."..."An alternative to using wxListItem, you can use set and get properties for an item with wxListCtrl convenience functions such as SetItemText, SetItemImage...and so on"

That said in the example that followed, a wxListItem was created first that was then used to create the columns. So in print, at least, it seems that this is the way to format the column headings. Try adding colour/font calls to the example below after appropriate translation from C++ :).

// Insert three columns wxListItem itemCol; itemCol.SetText(wxT("Column 1")); itemCol.SetImage(-1); # itemCol.SetFont(....) etc listCtrlReport->InsertColumn(0, itemCol); listCtrlReport->SetColumnWidth(0, wxLIST_AUTOSIZE); itemCol.SetText(wxT("Column 2")); listCtrlReport->InsertColumn(1, itemCol); listCtrlReport->SetColumnWidth(1, wxLIST_AUTOSIZE); itemCol.SetText(wxT("Column 3")); listCtrlReport->InsertColumn(2, itemCol); listCtrlReport->SetColumnWidth(2, wxLIST_AUTOSIZE);

James

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


In reply to Re: Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings? by jmlynesjr
in thread Wx::Perl: How to change/set font and size of Wx::ListCtrl column headings? by HelenCr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.