From 1317fd582164cb993e750d48356226f42732f677 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sun, 16 Jan 2000 10:39:00 +0000 Subject: [PATCH] file dialogs now remembers the width of the first column. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/filedlgg.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 7aa9851717..2fabafdd40 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -202,9 +202,6 @@ int wxFileIconsTable::GetIconID(const wxString& extension) - - - // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- @@ -476,11 +473,19 @@ long wxFileCtrl::Add( wxFileData *fd, wxListItem &item ) void wxFileCtrl::Update() { - ClearAll(); long my_style = GetWindowStyleFlag(); + int name_col_width = 0; + if (my_style & wxLC_REPORT) + { + if (GetColumnCount() > 0) + name_col_width = GetColumnWidth( 0 ); + } + + ClearAll(); if (my_style & wxLC_REPORT) { - InsertColumn( 0, _("Name"), wxLIST_FORMAT_LEFT, 130 ); + if (name_col_width < 140) name_col_width = 140; + InsertColumn( 0, _("Name"), wxLIST_FORMAT_LEFT, name_col_width ); InsertColumn( 1, _("Size"), wxLIST_FORMAT_LEFT, 60 ); InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 65 ); InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 ); -- 2.45.2