Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by jmlynesjr (Hermit)
on Apr 01, 2013 at 01:21 UTC ( #1026400=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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?

My pure guess is that sub GetTypeName() and sub CanGetValueAs() in defining column 0 as Bool, column 1 as Double and columns 2 through "last" as string is determining which cell renderer gets called for each column. Modify these subs to fit your column layout. Swap 0(bool) and 1(double) in both subs and see if the columns swap, I bet they will. (Tried this and they did swap!)

Did you look at wxGridTableBase docs? You will probably have to create sub SetValue(), sub SetValueAsBool(), and sub SetValueAsDouble() subs to get your data into the Grid and possibly others to fit your specific data.

I am out of ideas until there are specific questions to look into. I think you are close at this point.

Update1: Swapped versions for completeness:

sub GetTypeName { my( $grid, $r, $c ) = @_; return $c == 0 ? 'double' : # Col 0 Double $c == 1 ? 'bool' : # Col 1 Boolean 'string'; # All others String } sub CanGetValueAs { my( $grid, $r, $c, $type ) = @_; return $c == 0 ? $type eq 'double' : $c == 1 ? $type eq 'bool' : $type eq 'string'; }

James

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026400]
help
Chatterbox?
[zentara]: See problems with Nvidia and Linus Torvalds
[choroba]: that's 2012
[zentara]: I just acquired a computer with the card type, and wondered if it was best to stick with the open-source code or use NVIDIA's proprietary code
[zentara]: do you feel good about a non-open-source code, being in control of your display functions?
[choroba]: If you're not going to play 3d games on it, using the open source driver should be enough

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (12)
As of 2017-05-26 13:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?