Hi,

It isn't implemented in wxWidgets - probably because the library attempts to either use the native platform controls or mimic them as closely as possible. If you cannot do it with a native control, you most likely can't do it in wxWidgets. I doubt this is seen as a missing feature so you're unlikely to see it implemented in the future.

Wx::Grid is the way to go to do what you want.

By the way, I noticed on Perl Monks some information regarding how Wx::ListCtrl handles a large number of items.

For that you need to use the wxLC_VIRTUAL|wxREPORT style. See the Wx::Demo where the virtual list control reports 100,000 items.

For a Wx::Grid control with a large number of items, you should use a custom Wx::GridTable. The example in Wx::Demo reports 100,000 columns by 100,000 rows.

Hope it helps. Sorry no positive answer on the column formatting.

Regards

Mark


On 28/03/2013 23:40, James Lynes wrote:
Steve:

Thanks for taking a look! I haven't found anything else either. I think
it's a long standing issue.

I did mock-up an alternate solution using wxGrid(attached). It's a lot
more visually flexible, but not sure if it will fit into the  OPs plans.
We'll see.

Thanks again, James


On Thu, Mar 28, 2013 at 3:06 PM, <steveco.1...@gmail.com
<mailto:steveco.1...@gmail.com>> wrote:

    __
    Good Afternoon Florida,
    Hi James, I've had a look at your code thinking that it was an easy
    fix.... and I have the same as you.
    I guess the silence from other quarters implies that they too
    haven't found anything else.
    I can't really spend any more time on this now, but if I do get a
    minute I'll have another look.
    Good luck,
    Regards
    Steve

    ------------------------------------------------------------------------
    *From:* James Lynes [mailto:jmlyne...@gmail.com
    <mailto:jmlyne...@gmail.com>]
    *Sent:* 27 March 2013 15:42
    *To:* wxperl-users@perl.org <mailto:wxperl-users@perl.org>
    *Subject:* Formatting the Column Headers of a ListCtrl

    Good Afternoon(in Florida at least):

    I have been trying to help a Perl Monks poster with the question:
    How do you change the color and font of a ListCtrl column header?
    It's been interesting archeology so far!

    It seems that Wx::ListItem->SetTextColour
    ->SetBackgroundColour
    ->SetFont
    calls don't work when applied to a ListCtrl::InsertColumn(col, item)
    call. They work fine when applied to an item. SetText and SetWidth
    also work fine with InsertColumn.

    I found a post on the wxWidgets wiki saying as much and suggesting a
    work around of setting the color and font on the ListCtrl and then
    changing the color and font of the items as they are created. This
    kinda works except for setting the background of the column header.
    The font, font size and text color do get set as directed(on my
    CitrusPerl 5.16/2.8x installation). And the items get set as
    directed. See the attached test code.

    Is this issue "fixed" in 2.9.x? Any other ideas on changing the
    column header font/text color/background color? Any better work-arounds?

    Thanks for your time and experience.

    James





Reply via email to