Implement best size calculation for report mode wxListCtrl.
Use the column labels to determine the minimal width required by the control to show them all in full. Also declare all image list and column-related wxListCtrl methods in wxListCtrlBase now as we need some of them in DoGetBestClientSize() implementation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1730,7 +1730,7 @@ long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex)
|
||||
}
|
||||
|
||||
// For list view mode (only), inserts a column.
|
||||
long wxListCtrl::InsertColumn(long col, const wxListItem& item)
|
||||
long wxListCtrl::DoInsertColumn(long col, const wxListItem& item)
|
||||
{
|
||||
LV_COLUMN lvCol;
|
||||
wxConvertToMSWListCol(GetHwnd(), col, item, lvCol);
|
||||
@@ -1757,24 +1757,6 @@ long wxListCtrl::InsertColumn(long col, const wxListItem& item)
|
||||
return n;
|
||||
}
|
||||
|
||||
long wxListCtrl::InsertColumn(long col,
|
||||
const wxString& heading,
|
||||
int format,
|
||||
int width)
|
||||
{
|
||||
wxListItem item;
|
||||
item.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_FORMAT;
|
||||
item.m_text = heading;
|
||||
if ( width > -1 )
|
||||
{
|
||||
item.m_mask |= wxLIST_MASK_WIDTH;
|
||||
item.m_width = width;
|
||||
}
|
||||
item.m_format = format;
|
||||
|
||||
return InsertColumn(col, item);
|
||||
}
|
||||
|
||||
// scroll the control by the given number of pixels (exception: in list view,
|
||||
// dx is interpreted as number of columns)
|
||||
bool wxListCtrl::ScrollList(int dx, int dy)
|
||||
|
Reference in New Issue
Block a user