- m_imageListNormal->GetSize(i, width, height);
- if (height > m_lineHeight) m_lineHeight = height;
+ // Calculate a m_lineHeight value from the normal Image sizes.
+ // May be toggle off. Then wxGenericTreeCtrl will spread when
+ // necessary (which might look ugly).
+ int n = m_imageListNormal->GetImageCount();
+ for (int i = 0; i < n ; i++)
+ {
+ int width = 0, height = 0;
+ m_imageListNormal->GetSize(i, width, height);
+ if (height > m_lineHeight) m_lineHeight = height;
+ }
+ }
+
+ if (m_imageListButtons)
+ {
+ // Calculate a m_lineHeight value from the Button image sizes.
+ // May be toggle off. Then wxGenericTreeCtrl will spread when
+ // necessary (which might look ugly).
+ int n = m_imageListButtons->GetImageCount();
+ for (int i = 0; i < n ; i++)
+ {
+ int width = 0, height = 0;
+ m_imageListButtons->GetSize(i, width, height);
+ if (height > m_lineHeight) m_lineHeight = height;
+ }