]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
include object.h so that delete has complete type
[wxWidgets.git] / src / generic / listctrl.cpp
index 7fd022e786a8f38bf4f353cb0648b524703a74f7..97c78dfd4230919bb2fe8e0760cd615749b679af 100644 (file)
@@ -3704,6 +3704,19 @@ void wxListMainWindow::SetColumnWidth( int col, int width )
     if (width == wxLIST_AUTOSIZE_USEHEADER)
     {
         width = GetTextLength(column->GetText());
+        width += 2*EXTRA_WIDTH;
+
+        // check for column header's image availability
+        const int image = column->GetImage();
+        if ( image != -1 )
+        {
+            if ( m_small_image_list )
+            {
+                int ix = 0, iy = 0;
+                m_small_image_list->GetSize(image, ix, iy);
+                width += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE;
+            }
+        }
     }
     else if ( width == wxLIST_AUTOSIZE )
     {