Discussion:
How to call wxGrid's Render function - sequentially to achieve pagination?
Aravind Senguttuvan
2014-08-08 20:35:30 UTC
Permalink
"Pagination can be accomplished by using sequential Render() calls" from
http://docs.wxwidgets.org/trunk/classwx_grid.html

I understand How - sequential pages can be got from top left and bottom
right coordinates.
But I dont get what needs to be the wxDC in the Render() call . ?
I want to get the first three rows in the grid

BigGridFrame::BigGridFrame(long sizeGrid)
: wxFrame(NULL, wxID_ANY, wxT("Plugin Virtual Table"),
wxDefaultPosition, wxSize(500, 450))
{
m_grid = new wxGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_table = new BigGridTable(sizeGrid);
m_grid->SetTable(m_table, true);

//The above code gave me the table
//trying to get first three rows by render() function but it still gets the
all of the grid values
**const wxGridCellCoords topLeft(0, 0);
const wxGridCellCoords bottomRight(3,4 );
wxClientDC clientDC(this); //this place I am not sure.. I couldnt find
documentation
this->SelectBlock(topLeft, bottomRight, false);
this->Render(clientDC, wxDefaultPosition, wxDefaultSize, topLeft,
bottomRight, wxEXPAND);**
}
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
John Roberts
2014-08-09 02:08:52 UTC
Permalink
Post by Aravind Senguttuvan
"Pagination can be accomplished by using sequential Render() calls"
from http://docs.wxwidgets.org/trunk/classwx_grid.html
I understand How - sequential pages can be got from top left and
bottom right coordinates.
But I dont get what needs to be the wxDC in the Render() call . ?
I want to get the first three rows in the grid
BigGridFrame::BigGridFrame(long sizeGrid)
: wxFrame(NULL, wxID_ANY, wxT("Plugin Virtual Table"),
wxDefaultPosition, wxSize(500, 450))
{
m_grid = new wxGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
m_table = new BigGridTable(sizeGrid);
m_grid->SetTable(m_table, true);
//The above code gave me the table
//trying to get first three rows by render() function but it still
gets the all of the grid values
**const wxGridCellCoords topLeft(0, 0);
const wxGridCellCoords bottomRight(3,4 );
wxClientDC clientDC(this); //this place I am not sure.. I couldnt
find documentation
this->SelectBlock(topLeft, bottomRight, false);
this->Render(clientDC, wxDefaultPosition, wxDefaultSize, topLeft,
bottomRight, wxEXPAND);**
}
--
I am not completely sure what you are trying to do here but the Render()
function is used to produce a bitmap representation of an already
constructed and displayed wxGrid. There is an example of using it in the
grid sample in GridFrame::OnGridRender
Render() is not used to construct a wxGrid.

Regards, John
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...