fixed SetColumnWidth() in wxLC_LIST mode (set column to 0, not -1)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -671,17 +671,15 @@ int wxListCtrl::GetColumnWidth(int col) const
|
|||||||
// Sets the column width
|
// Sets the column width
|
||||||
bool wxListCtrl::SetColumnWidth(int col, int width)
|
bool wxListCtrl::SetColumnWidth(int col, int width)
|
||||||
{
|
{
|
||||||
int col2 = col;
|
|
||||||
if ( m_windowStyle & wxLC_LIST )
|
if ( m_windowStyle & wxLC_LIST )
|
||||||
col2 = -1;
|
col = 0;
|
||||||
|
|
||||||
int width2 = width;
|
if ( width == wxLIST_AUTOSIZE)
|
||||||
if ( width2 == wxLIST_AUTOSIZE)
|
width = LVSCW_AUTOSIZE;
|
||||||
width2 = LVSCW_AUTOSIZE;
|
else if ( width == wxLIST_AUTOSIZE_USEHEADER)
|
||||||
else if ( width2 == wxLIST_AUTOSIZE_USEHEADER)
|
width = LVSCW_AUTOSIZE_USEHEADER;
|
||||||
width2 = LVSCW_AUTOSIZE_USEHEADER;
|
|
||||||
|
|
||||||
return ListView_SetColumnWidth(GetHwnd(), col2, width2) != 0;
|
return ListView_SetColumnWidth(GetHwnd(), col, width) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the number of items that can fit vertically in the
|
// Gets the number of items that can fit vertically in the
|
||||||
|
Reference in New Issue
Block a user