The title of the column. }
@row3col{width, integer,
The column width. }
+@row3col{image, integer,
+ The zero-based index of the image associated with the item in the 'small' image list. }
@endTable
The columns are appended to the control in order of their appearance and may be
// XRCCTRL
wxListCtrl * const list = XRCCTRL(dlg, "controls_listctrl", wxListCtrl);
- list->InsertItem(0, "Athos"); list->SetItem(0, 1, "90");
- list->InsertItem(1, "Porthos"); list->SetItem(1, 1, "120");
- list->InsertItem(2, "Aramis"); list->SetItem(2, 1, "80");
+ list->InsertItem(0, "Athos", 0); list->SetItem(0, 1, "90", 2);
+ list->InsertItem(1, "Porthos", 5); list->SetItem(1, 1, "120", 3);
+ list->InsertItem(2, "Aramis", 1); list->SetItem(2, 1, "80", 4);
#endif // wxUSE_LISTCTRL
#if wxUSE_TREECTRL
<object class="wxListCtrl" name="controls_listctrl">
<size>220,160</size>
<style>wxLC_REPORT|wxBORDER_SIMPLE</style>
+ <imagelist-small>
+ <size>16,16</size>
+ <bitmap stock_id="wxART_HELP_BOOK"/>
+ <bitmap stock_id="wxART_INFORMATION"/>
+ <bitmap stock_id="wxART_GO_UP"/>
+ <bitmap stock_id="wxART_PLUS"/>
+ <bitmap stock_id="wxART_GO_DOWN"/>
+ <bitmap stock_id="wxART_WARNING"/>
+ </imagelist-small>
<object class="listcol">
<text>Name</text>
- <width>150</width>
+ <width>105</width>
+ <image>0</image>
</object>
<object class="listcol">
<text>Weight</text>
<align>wxLIST_FORMAT_RIGHT</align>
- <width>50</width>
+ <width>105</width>
+ <image>1</image>
</object>
<!-- the items are added from the code -->
</object>
HandleCommonItemAttrs(item);
if (HasParam(wxT("width")))
item.SetWidth((int)GetLong(wxT("width")));
+ if (HasParam(wxT("image")))
+ item.SetImage((int)GetLong(wxT("image")));
list->InsertColumn(list->GetColumnCount(), item);
}