X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..8b3fddc49326c0b6019cd7082218726aa17a5727:/src/msw/listbox.cpp 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 }