Пример #1
0
// recolour the entire list
void wxAdvancedListCtrl::ColourList()
{
    for (long i = 0; i < GetItemCount(); ++i)
    {
        ColourListItem(i);
    }
}
Пример #2
0
void wxAdvancedListCtrl::ColourListItem(long item)
{
    wxListItem ListItem;
    ListItem.SetId(item);

    ColourListItem(ListItem);

    SetItem(ListItem);
}
Пример #3
0
// Our variation of InsertItem, so we can do magical things!
long wxAdvancedListCtrl::ALCInsertItem(const wxString &Text)
{
    wxListItem ListItem;

    ListItem.m_itemId = InsertItem(GetItemCount(), Text, -1);

    ColourListItem(ListItem.m_itemId);

    SetItem(ListItem);

    // wxWidgets bug: Required for sorting colours correctly
    SetItemTextColour(ListItem.m_itemId, GetTextColour());

    return ListItem.m_itemId;
}
Пример #4
0
// Our variation of InsertItem, so we can do magical things!
long wxAdvancedListCtrl::ALCInsertItem(wxListItem &info)
{
    //Sort();

    // TODO: We need to remember this item id, because the last item on the list
    // does not get sorted, we can't move sort either, because then the return 
    // index would be stale.
    info.SetId(InsertItem(info));
   
    ColourListItem(info);

    SetItem(info);

    return info.GetId();
}