Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: wxGridTable how is the grid filled in

by Anonymous Monk
on May 19, 2014 at 01:21 UTC ( #1086576=note: print w/replies, xml ) Need Help??


in reply to wxGridTable how is the grid filled in

I don't understand where the cells in de grid are filled in in this example

Can you identify the gridtable object? They're all filled by the subclass  package MyGridTable;

This part

my $table = MyGridTable->new; # Virtual Table object $grid->SetTable( $table );
What this means, is when $grid (a wxGrid) decides it needs to show the Nth-col/Nth-row item, it calls $table->GetValue(x,y) , and sub MyGridTable::GetValue returns what is going to be filled ... this is why its virtual

Actually first it calls MyGridTable::CanGetValueAs() to decide whether to call MyGridTable::GetValueAsBool() for the checkboxes/checkbuttons, or MyGridTable::GetValueAsDouble() ...

For the conceptual model see
Wx::Perl::ListView/Wx::Perl::ListView::SimpleModel/https://metacpan.org/source/MBARBON/Wx-Perl-ListView-0.01/example/listview.pl
http://wiki.wxperl.it/Wx::GridTableBase
http://wiki.wxperl.it/Wx::Grid

You should already have a copy of the wxwidgets manual ... because currently the online version of the docs is down :)
http://docs.wxwidgets.org/trunk/search.php?query=wxGrid
http://docs.wxwidgets.org/trunk/overview_grid.html
http://docs.wxwidgets.org/trunk/classwx_grid.html

I would like to use this module but somehow i need to start with a empty grid and understand what is going on. I googled around but i did not find any explenation how it works.

The docs tie it together :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1086576]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2020-10-23 21:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (241 votes). Check out past polls.

    Notices?