Use sensible default column width in generic wxListCtrl too
Set width of the new columns to wxLIST_DEFAULT_COL_WIDTH and not 0 in the generic version: this is more compatible with the MSW version and more useful. Document that omitting list column width in XRC results in columns of default, rather than null, as previously, width.
This commit is contained in:
@@ -313,8 +313,9 @@ void wxListHeaderData::SetItem( const wxListItem &item )
|
||||
if ( m_mask & wxLIST_MASK_FORMAT )
|
||||
m_format = item.m_format;
|
||||
|
||||
if ( m_mask & wxLIST_MASK_WIDTH )
|
||||
SetWidth(item.m_width);
|
||||
// Always give some initial width to the new columns (it's still possible
|
||||
// to set the width to 0 explicitly, however).
|
||||
SetWidth(m_mask & wxLIST_MASK_WIDTH ? item.m_width : wxLIST_DEFAULT_COL_WIDTH);
|
||||
|
||||
if ( m_mask & wxLIST_MASK_STATE )
|
||||
SetState(item.m_state);
|
||||
|
Reference in New Issue
Block a user