Use dictionary sort for wxListBox strings.

This should result in more expected, and more consistent with MSW, order of
the items differing in case only.

Also do the same for wxChoice in wxGTK1.

Closes #16356.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-07-13 12:17:16 +00:00
parent 2d88120f54
commit 61dfb42b6e
4 changed files with 4 additions and 4 deletions

View File

@@ -125,7 +125,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
{
// if our m_strings != NULL, Append() will check for it and insert
// items in the correct order
m_strings = new wxSortedArrayString;
m_strings = new wxSortedArrayString(wxDictionaryStringSortAscending);
}
// begin with no selection

View File

@@ -541,7 +541,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
if ( style & wxLB_SORT )
{
// this will change Append() behaviour
m_strings = new wxSortedArrayString;
m_strings = new wxSortedArrayString(wxDictionaryStringSortAscending);
}
else
{

View File

@@ -83,7 +83,7 @@ bool wxListBox::Create(
return false;
if ( IsSorted() )
m_strings.sorted = new wxSortedArrayString;
m_strings.sorted = new wxSortedArrayString(wxDictionaryStringSortAscending);
else
m_strings.unsorted = new wxArrayString;

View File

@@ -190,7 +190,7 @@ bool wxListBox::Create(wxWindow *parent,
return false;
if ( IsSorted() )
m_strings.sorted = new wxSortedArrayString;
m_strings.sorted = new wxSortedArrayString(wxDictionaryStringSortAscending);
else
m_strings.unsorted = new wxArrayString;