added test for wxLIST_FORMAT_CENTRE/RIGHT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -391,23 +391,20 @@ void MyFrame::InitWithReportItems()
|
||||
{
|
||||
m_listCtrl->SetImageList(m_imageListSmall, wxIMAGE_LIST_SMALL);
|
||||
|
||||
// under MSW for SetColumnWidth() to work we need to create the items with
|
||||
// images initially
|
||||
#if 1
|
||||
// note that under MSW for SetColumnWidth() to work we need to create the
|
||||
// items with images initially even if we specify dummy image id
|
||||
wxListItem itemCol;
|
||||
itemCol.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_IMAGE;
|
||||
itemCol.m_text = _T("Column 1");
|
||||
itemCol.m_image = -1;
|
||||
itemCol.SetText(_T("Column 1"));
|
||||
itemCol.SetImage(-1);
|
||||
m_listCtrl->InsertColumn(0, itemCol);
|
||||
itemCol.m_text = _T("Column 2");
|
||||
|
||||
itemCol.SetText(_T("Column 2"));
|
||||
itemCol.SetAlign(wxLIST_FORMAT_CENTRE);
|
||||
m_listCtrl->InsertColumn(1, itemCol);
|
||||
itemCol.m_text = _T("Column 3");
|
||||
|
||||
itemCol.SetText(_T("Column 3"));
|
||||
itemCol.SetAlign(wxLIST_FORMAT_RIGHT);
|
||||
m_listCtrl->InsertColumn(2, itemCol);
|
||||
#else
|
||||
m_listCtrl->InsertColumn(0, _T("Column 1")); // , wxLIST_FORMAT_LEFT, 140);
|
||||
m_listCtrl->InsertColumn(1, _T("Column 2")); // , wxLIST_FORMAT_LEFT, 140);
|
||||
m_listCtrl->InsertColumn(2, _T("One More Column (2)")); // , wxLIST_FORMAT_LEFT, 140);
|
||||
#endif
|
||||
|
||||
// to speed up inserting we hide the control temporarily
|
||||
m_listCtrl->Hide();
|
||||
|
Reference in New Issue
Block a user