Always give all the remaining space to the first wxTreeListCtrl column.
Under GTK the columns of wxDataViewCtrl (and hence wxTreeListCtrl) are always resized to cover the entire control width. For consistency, also do it under the other platforms and give the remaining space to the first column and not to the last one as GTK does by default, as the first column is more important. Do this even if this results in reducing the size of the column: presumably, if the entire control itself can be resized, the user wouldn't bother resizing the columns and, on the contrary, if the user did resize the columns, the entire control size is unlikely to change, so in practice we don't risk overriding the user preferences and reducing as well as increasing the first column width works much better by default as it doesn't leave the other columns invisible after making the control wider and than reverting it back to its initial, more narrow, state again. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -319,7 +319,9 @@ public:
|
||||
@param width
|
||||
The width of the column in pixels or the special
|
||||
wxCOL_WIDTH_AUTOSIZE value indicating that the column should adjust
|
||||
to its contents.
|
||||
to its contents. Notice that the first column is special and will
|
||||
be always resized to fill all the space not taken by the other
|
||||
columns, i.e. the width specified here is ignored for it.
|
||||
@param align
|
||||
Alignment of both the column header and its items.
|
||||
@param flags
|
||||
@@ -360,6 +362,9 @@ public:
|
||||
|
||||
Set column width to either the given value in pixels or to the value
|
||||
large enough to fit all of the items if width is wxCOL_WIDTH_AUTOSIZE.
|
||||
|
||||
Notice that setting the width of the first column is ignored as this
|
||||
column is always resized to fill the space left by the other columns.
|
||||
*/
|
||||
void SetColumnWidth(unsigned col, int width);
|
||||
|
||||
|
Reference in New Issue
Block a user