]> git.saurik.com Git - wxWidgets.git/commitdiff
file dialogs now remembers the width of the
authorRobert Roebling <robert@roebling.de>
Sun, 16 Jan 2000 10:39:00 +0000 (10:39 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 16 Jan 2000 10:39:00 +0000 (10:39 +0000)
    first column.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/filedlgg.cpp

index 7aa9851717417095dfab65eab416a5efea360225..2fabafdd40db7bdfe6e13533d668b56e6173685b 100644 (file)
@@ -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 );