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:
@@ -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
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user