Prealpha, prebeta of new wxTreeCtrl for GTK. It is possible to AddRoot,

AppendItem... InsertItem and PrependItem is not working...
Sample modified to new API. I understand that operator wxTreeItemId::long()
exists on MSW wxWindows, but on wxGTK id type is a pointer...

2Vadim: Please test the sample with MSW wxTreeCtrl.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Denis Pershin
1998-10-24 05:52:43 +00:00
parent 321db4b6bf
commit e21a504837
5 changed files with 1628 additions and 1508 deletions

View File

@@ -109,7 +109,7 @@ bool MyApp::OnInit()
frame->m_treeCtrl->SetImageList(wxGetApp().m_imageListNormal, wxIMAGE_LIST_NORMAL);
long rootId = frame->m_treeCtrl->InsertItem(0, "Root", 0);
wxTreeItemId rootId = frame->m_treeCtrl->AddRoot("Root", 0);
char buf[20];
int i;
@@ -119,20 +119,20 @@ bool MyApp::OnInit()
{
sprintf(buf, "Folder child %d", i);
str = buf;
long id = frame->m_treeCtrl->InsertItem(rootId, str, 0);
wxTreeItemId id = frame->m_treeCtrl->AppendItem(rootId, str, 0);
int j;
for ( j = 0; j < 5; j++)
{
sprintf(buf, "File child %d", j);
str = buf;
frame->m_treeCtrl->InsertItem(id, str, 1);
frame->m_treeCtrl->AppendItem(id, str, 1);
}
}
for ( i = 0; i < 10; i++)
{
sprintf(buf, "File child %d", i);
str = buf;
frame->m_treeCtrl->InsertItem(rootId, str, 1);
frame->m_treeCtrl->AppendItem(rootId, str, 1);
}
frame->CreateStatusBar(3);