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
This commit is contained in:
@@ -202,9 +202,6 @@ int wxFileIconsTable::GetIconID(const wxString& extension)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private functions
|
// private functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -476,11 +473,19 @@ long wxFileCtrl::Add( wxFileData *fd, wxListItem &item )
|
|||||||
|
|
||||||
void wxFileCtrl::Update()
|
void wxFileCtrl::Update()
|
||||||
{
|
{
|
||||||
ClearAll();
|
|
||||||
long my_style = GetWindowStyleFlag();
|
long my_style = GetWindowStyleFlag();
|
||||||
|
int name_col_width = 0;
|
||||||
if (my_style & wxLC_REPORT)
|
if (my_style & wxLC_REPORT)
|
||||||
{
|
{
|
||||||
InsertColumn( 0, _("Name"), wxLIST_FORMAT_LEFT, 130 );
|
if (GetColumnCount() > 0)
|
||||||
|
name_col_width = GetColumnWidth( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
ClearAll();
|
||||||
|
if (my_style & wxLC_REPORT)
|
||||||
|
{
|
||||||
|
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( 1, _("Size"), wxLIST_FORMAT_LEFT, 60 );
|
||||||
InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 65 );
|
InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 65 );
|
||||||
InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 );
|
InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 );
|
||||||
|
Reference in New Issue
Block a user