I'm trying to make a virtual Wx::Grid control using Wx::PlGridTable work
with my own attributes. Unfortunately the overloaded GetAttr method is never
called.

What I did is subclass the Wx::PlGridTable class with a overloaded GetAttr
method in it. I can't get this method to be called to set proper attributes.
Other parts of my subclassed Wx::PlGridTable works well.

The problem is easiest reproduced as follows:

>From the wxPerl demos, edit the file wxGridTable.pm

Within the Wx::DemoWindows::wxGridTable::Table package, add the following:

sub GetAttr {
    print "GetAttr called!\n";
}

Run the demo, the method is never called.

After trying several things to make this work I tried to work around the
problem by subclassing Wx::GridCellAttrProvider and use it's GetAttr method.
However it seems there's no Wx::GridCellAttrProvider class in wxPerl.

I need to have a virtual Grid since I'm showing large amounts of data. There
must be a way to provide the attributes since without it it's not possible
to set the color, alignment, etc. I've tried on OSX and Linux. What am I
missing here?

Any ideas?

Richard

Reply via email to