#include "wx/hashmap.h"
-#define wxMAC_ALWAYS_USE_GENERIC_LISTCTRL wxT("mac.listctrl.always_use_generic")
-
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxListCtrlStyle )
virtual void MacSetColumnInfo( unsigned int row, unsigned int column, wxListItem* item );
virtual void MacGetColumnInfo( unsigned int row, unsigned int column, wxListItem& item );
virtual void UpdateState(wxMacDataItem* dataItem, wxListItem* item);
-
+ int GetFlags() { return m_flags; }
+
protected:
// we need to override to provide specialized handling for virtual wxListCtrls
virtual OSStatus GetSetItemData(DataBrowserItemID itemID,
wxClientDataType m_clientDataItemsType;
bool m_isVirtual;
+ int m_flags;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacDataBrowserListCtrlControl)
};
}
GetEventHandler()->ProcessEvent(le);
}
+ event.Skip();
}
#endif
totalWidth += m_dbImpl->GetColumnWidth( column );
}
- Boolean vertScrollBar;
- GetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), NULL, &vertScrollBar );
- if (totalWidth > width)
- SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), true, vertScrollBar );
- else
- SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), false, vertScrollBar );
+ if ( !(m_dbImpl->GetFlags() & wxHSCROLL) )
+ {
+ Boolean vertScrollBar;
+ GetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), NULL, &vertScrollBar );
+ if (totalWidth > width)
+ SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), true, vertScrollBar );
+ else
+ SetDataBrowserHasScrollBars( m_dbImpl->GetControlRef(), false, vertScrollBar );
+ }
}
}
{
wxListItem colInfo;
GetColumn(col, colInfo);
-
+
colInfo.SetWidth(width);
SetColumn(col, colInfo);
m_dbImpl->SetColumnWidth(col, mywidth);
OSStatus err = noErr;
m_clientDataItemsType = wxClientData_None;
m_isVirtual = false;
+ m_flags = 0;
if ( style & wxLC_VIRTUAL )
m_isVirtual = true;
}
verify_noerr( SetHiliteStyle(kDataBrowserTableViewFillHilite ) );
- err = SetHasScrollBars( (style & wxHSCROLL) != 0 , (style & wxVSCROLL) != 0 );
+ verify_noerr( SetHasScrollBars( (style & wxHSCROLL) != 0 , true ) );
}
pascal Boolean wxMacDataBrowserListCtrlControl::DataBrowserEditTextProc(
// avoid asserts by getting out now
return ;
}
-
+
wxListCtrl *list = wxDynamicCast( GetPeer() , wxListCtrl );
if ( list )
{