revert addition of the simple listctrl; it doesn't help.
Log the version of comctl32.dll under wxMSW; it's useful when reporting bugs or when debugging git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,18 +92,18 @@ IMPLEMENT_APP(MyApp)
|
|||||||
// `Main program' equivalent, creating windows and returning main app frame
|
// `Main program' equivalent, creating windows and returning main app frame
|
||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
{
|
{
|
||||||
if ( !wxApp::OnInit() )
|
if ( !wxApp::OnInit() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
MyFrame *frame = new MyFrame(wxT("wxListCtrl Test"));
|
MyFrame *frame = new MyFrame(wxT("wxListCtrl Test"));
|
||||||
|
|
||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
SetTopWindow(frame);
|
SetTopWindow(frame);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -157,11 +157,10 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
// My frame constructor
|
// My frame constructor
|
||||||
MyFrame::MyFrame(const wxChar *title)
|
MyFrame::MyFrame(const wxChar *title)
|
||||||
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 500))
|
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500))
|
||||||
{
|
{
|
||||||
m_listCtrl = NULL;
|
m_listCtrl = NULL;
|
||||||
m_logWindow = NULL;
|
m_logWindow = NULL;
|
||||||
m_simpleListCtrl = NULL;
|
|
||||||
m_smallVirtual = false;
|
m_smallVirtual = false;
|
||||||
|
|
||||||
// Give it an icon
|
// Give it an icon
|
||||||
@@ -266,24 +265,11 @@ MyFrame::MyFrame(const wxChar *title)
|
|||||||
|
|
||||||
RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
|
RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
|
||||||
|
|
||||||
// Also add a simple list to the sample
|
#ifdef __WXMSW__
|
||||||
|
// this is useful to know specially when debugging :)
|
||||||
m_simpleListCtrl = new wxListCtrl( m_panel, -1, wxDefaultPosition, wxDefaultSize,
|
wxLogMessage("Your version of comctl32.dll is: %d",
|
||||||
wxLC_REPORT | wxLC_SINGLE_SEL );
|
wxApp::GetComCtl32Version());
|
||||||
m_simpleListCtrl->InsertColumn(0, "Column 1", wxLIST_FORMAT_LEFT, 80);
|
#endif
|
||||||
m_simpleListCtrl->InsertColumn(1, "Column 2", wxLIST_FORMAT_LEFT, 100);
|
|
||||||
m_simpleListCtrl->InsertColumn(2, "Column 3", wxLIST_FORMAT_LEFT, 100);
|
|
||||||
|
|
||||||
for ( int i = 0; i < NUM_ITEMS; i++ )
|
|
||||||
{
|
|
||||||
wxString buf;
|
|
||||||
buf.Printf(_T("Item %d"), i);
|
|
||||||
long tmp = m_simpleListCtrl->InsertItem(i, buf, 0);
|
|
||||||
buf.Printf(_T("Col 1, item %d"), i);
|
|
||||||
m_simpleListCtrl->SetItem(tmp, 1, buf);
|
|
||||||
buf.Printf(_T("Col 2, item %d"), i);
|
|
||||||
m_simpleListCtrl->SetItem(tmp, 2, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
CreateStatusBar();
|
CreateStatusBar();
|
||||||
@@ -312,8 +298,7 @@ void MyFrame::DoSize()
|
|||||||
|
|
||||||
wxSize size = GetClientSize();
|
wxSize size = GetClientSize();
|
||||||
wxCoord y = (2*size.y)/3;
|
wxCoord y = (2*size.y)/3;
|
||||||
m_listCtrl->SetSize(0, 0, size.x-320, y);
|
m_listCtrl->SetSize(0, 0, size.x, y);
|
||||||
if (m_simpleListCtrl) m_simpleListCtrl->SetSize(size.x-320+1, 0, 320-1, y);
|
|
||||||
m_logWindow->SetSize(0, y + 1, size.x, size.y - y -1);
|
m_logWindow->SetSize(0, y + 1, size.x, size.y - y -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -153,7 +153,6 @@ protected:
|
|||||||
|
|
||||||
wxPanel *m_panel;
|
wxPanel *m_panel;
|
||||||
MyListCtrl *m_listCtrl;
|
MyListCtrl *m_listCtrl;
|
||||||
wxListCtrl *m_simpleListCtrl;
|
|
||||||
wxTextCtrl *m_logWindow;
|
wxTextCtrl *m_logWindow;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user