diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 9634d40062..24954256fd 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -563,8 +563,12 @@ void wxListBox::SetString(int N, const wxString& s) #if wxUSE_OWNER_DRAWN if ( m_windowStyle & wxLB_OWNERDRAW ) + { // update item's text m_aItems[N]->SetName(s); + // reassign the item's data + ListBox_SetItemData(GetHwnd(), N, m_aItems[N]); + } #endif //USE_OWNER_DRAWN }