]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
allow passing -1 range to SetScrollbar() to indicate the the scrollbar should be...
[wxWidgets.git] / src / generic / listctrl.cpp
index 028a0fddd429ffbe26877f5a2a3d2bcce8b3e411..c42fded26c26be02ad3ffdb22c60a67042aeb2b8 100644 (file)
@@ -1414,7 +1414,7 @@ bool wxListLineData::SetAttributes(wxDC *dc,
 #ifdef __WXMAC__
     {
         if (m_owner->HasFocus()
-#if !defined(__WXUNIVERSAL__)
+#if !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON
                 && IsControlActive( (ControlRef)m_owner->GetHandle() )
 #endif
         )
@@ -1478,7 +1478,7 @@ void wxListLineData::Draw( wxDC *dc )
         {
             int flags = wxCONTROL_SELECTED;
             if (m_owner->HasFocus()
-#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__) && wxOSX_USE_CARBON
                 && IsControlActive( (ControlRef)m_owner->GetHandle() )
 #endif
             )
@@ -5045,10 +5045,9 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
 
     m_headerHeight = 0;
 
-    if ( !(style & wxLC_MASK_TYPE) )
-    {
-        style = style | wxLC_LIST;
-    }
+    // just like in other ports, an assert will fail if the user doesn't give any type style:
+    wxASSERT_MSG( (style & wxLC_MASK_TYPE),
+                  _T("wxListCtrl style should have exactly one mode bit set") );
 
     if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
         return false;