Fix width of the wxDataViewTreeCtrl column under OSX/Cocoa.

Set the column resizing mode to "automatic" instead of "none" if the control
doesn't show the header. This allows the native control to properly resize the
only tree control column to always take up the entire window size (provided we
don't explicitly create it resizeable, so don't do this).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-11-10 17:42:58 +00:00
parent a35169b622
commit 0e17930f43
2 changed files with 20 additions and 6 deletions

View File

@@ -2064,7 +2064,15 @@ bool wxDataViewTreeCtrl::Create( wxWindow *parent, wxWindowID id,
AssociateModel( store );
store->DecRef();
AppendIconTextColumn(wxString(),0,wxDATAVIEW_CELL_EDITABLE,-1);
AppendIconTextColumn
(
wxString(), // no label (header is not shown anyhow)
0, // the only model column
wxDATAVIEW_CELL_EDITABLE,
-1, // default width
wxALIGN_NOT, // and alignment
0 // not resizeable
);
return true;
}