- m_bound_all.width = 0;
- m_bound_all.height = 0;
- wxNode *node = m_items.First();
- while (node)
- {
- wxListItemData *item = (wxListItemData*)node->Data();
- wxString s;
- item->GetText( s );
- if (s.IsNull()) s = "H";
- long lw,lh;
- dc->GetTextExtent( s, &lw, &lh );
- item->SetSize( item->GetWidth(), lh );
- m_bound_all.width += lw;
- m_bound_all.height = lh;
- node = node->Next();
- }
- break;
+ case wxLC_ICON:
+ {
+ m_bound_all.width = m_spacing;
+ m_bound_all.height = m_spacing+13;
+ wxNode *node = m_items.First();
+ if (node)
+ {
+ wxListItemData *item = (wxListItemData*)node->Data();
+ wxString s;
+ item->GetText( s );
+ long lw,lh;
+ dc->GetTextExtent( s, &lw, &lh );
+ if (lw > m_spacing) m_bound_all.width = lw;
+ }
+ break;
+ }
+ case wxLC_LIST:
+ {
+ wxNode *node = m_items.First();
+ if (node)
+ {
+ wxListItemData *item = (wxListItemData*)node->Data();
+ wxString s;
+ item->GetText( s );
+ long lw,lh;
+ dc->GetTextExtent( s, &lw, &lh );
+ m_bound_all.width = lw;
+ m_bound_all.height = lh;
+ }
+ break;
+ }
+ case wxLC_REPORT:
+ {
+ m_bound_all.width = 0;
+ m_bound_all.height = 0;
+ wxNode *node = m_items.First();
+ while (node)
+ {
+ wxListItemData *item = (wxListItemData*)node->Data();
+ wxString s;
+ item->GetText( s );
+ if (s.IsNull()) s = "H";
+ long lw,lh;
+ dc->GetTextExtent( s, &lw, &lh );
+ item->SetSize( item->GetWidth(), lh );
+ m_bound_all.width += lw;
+ m_bound_all.height = lh;
+ node = node->Next();
+ }
+ break;
+ }