#include <wx/wx.h>
#include <wx/dataview.h>
#include <wx/splash.h>
class Simple:public wxFrame
{
public:
Simple(const wxString& title );
};
Simple::Simple(const wxString& title)
:wxFrame(NULL,-1,title)
{
wxImage::AddHandler(new wxPNGHandler);
wxBitmap bitmap;
if (bitmap.LoadFile("splash.png", wxBITMAP_TYPE_PNG))
{
wxSplashScreen* splash = new wxSplashScreen(bitmap,
wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT,
6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
wxBORDER_SIMPLE | wxSTAY_ON_TOP);
}
wxYield();
wxDataViewListCtrl *listctrl = new wxDataViewListCtrl( this,-1
,wxPoint(-1,-1),wxSize(-1,-1)
,wxDV_SINGLE//单选模式
|wxDV_ROW_LINES//对行使用交替颜色
|wxDV_HORIZ_RULES|wxDV_VERT_RULES//行线 列线
);
listctrl->AppendToggleColumn( "Toggle" );
listctrl->AppendTextColumn( "Text" );
wxVector<wxVariant> data;
data.push_back( wxVariant(true) );
data.push_back( wxVariant("row 1") );
listctrl->AppendItem( data );
data.clear();
data.push_back( wxVariant(false) );
data.push_back( wxVariant("row 3") );
listctrl->AppendItem( data );
}