]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listbox.cpp
added automatic growing of in-place wxTextCtrls for generic wxListCtrl and wxTreeCtrl
[wxWidgets.git] / src / msw / listbox.cpp
index 3594e49841dc37e63077f988350b443015b407bb..98d9b64dd4751fce5c7cab926ca2e47e9f782199 100644 (file)
@@ -307,8 +307,12 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
         if ( clientData )
         {
 #if wxUSE_OWNER_DRAWN
-            wxASSERT_MSG(clientData[i] == NULL,
-                         wxT("Can't use client data with owner-drawn listboxes"));
+            if ( m_windowStyle & wxLB_OWNERDRAW )
+            {
+                wxASSERT_MSG(clientData[i] == NULL,
+                             wxT("Can't use client data with owner-drawn listboxes"));
+            }
+            ListBox_SetItemData(GetHwnd(), i, clientData[i]);
 #else // !wxUSE_OWNER_DRAWN
             ListBox_SetItemData(GetHwnd(), i, clientData[i]);
 #endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN