$szTitle = "wxgrid classes overview"; include "./_header.inc"; ?>
classes: wxgrid
introduction
getting started: a simple example
a more complex example
how the wxgrid classes relate to each other
keyboard and mouse actions
// create a wxgrid object grid = new wxgrid( this, -1, wxpoint( 0, 0 ), wxsize( 400, 300 ) ); // then we call creategrid to set the dimensions of the grid // (100 rows and 10 columns in this example) grid->creategrid( 100, 10 ); // we can set the sizes of individual rows and columns // in pixels grid->setrowsize( 0, 60 ); grid->setcolsize( 0, 120 ); // and set grid cell contents as strings grid->setcellvalue( 0, 0, "wxgrid is good" ); // we can specify that some cells are read-only grid->setcellvalue( 0, 3, "this is read-only" ); grid->setreadonly( 0, 3 ); // colours can be specified for grid cell contents grid->setcellvalue(3, 3, "green on grey"); grid->setcelltextcolour(3, 3, *wxgreen); grid->setcellbackgroundcolour(3, 3, *wxlight_grey); // we can specify the some cells will store numeric // values rather than strings. here we set grid column 5 // to hold floating point values displayed with width of 6 // and precision of 2 grid->setcolformatfloat(5, 6, 2); grid->setcellvalue(0, 6, "3.1415");
include "./_footer.inc"; ?>