
?
#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 ); ? ? 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 );
} ?
|