#include "wx/wxprec.h"
#include"wx/wx.h"
#include "wx/grid.h"
#include "wx/dbtable.h"
class wxGrid;
class GridApp:public wxApp
{
public:
bool OnInit();
};
class GridFrame:public wxFrame
{
public:
GridFrame();
wxGrid *grid;
};
IMPLEMENT_APP(GridApp)
bool GridApp::OnInit()
{
GridFrame *frame =new GridFrame;
frame->Show(true);
return true;
}
GridFrame::GridFrame()
: wxFrame( (wxFrame *)NULL, wxID_ANY, wxT("wxWidgets grid class demo"),
wxDefaultPosition,
wxDefaultSize )
{
SetIcon(wxICON(sample));
wxMenu *fileMenu = new wxMenu;
grid = new wxGrid( this,
wxID_ANY,
wxPoint( 0, 0 ),
wxSize( 400, 300 ) );
grid->CreateGrid( 0, 0 );
//grid->GetTable()->SetAttrProvider(new CustomColumnHeadersProvider());
grid->AppendRows(10);
grid->AppendCols(10);
}
wxWidgets之grid 参照于sample
最新推荐文章于 2023-07-19 16:54:00 发布