zephyrer / advcombobox

Automatically exported from code.google.com/p/advcombobox
0 stars 0 forks source link

Case-sensitive auto-append #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The autoappend functionality is case sensitive. It should be insensitive.

Possible solution:
http://www.codeproject.com/Messages/582531/Re-Can-it-be-case-insensitive-Yes.asp
x

"
This is the code I used to make it case insensitive:

to make the autoappend case insensitive do this around line 1709, to make the 
autosugges case insensitive do it again around 1764

replace:
item = *m_iter;
int nPos = m_iter->strText.find( str, 0 );
if( nPos == 0 )
{//..

with:
item = *m_iter;
bool bMatch = true;

if (nEditLen < m_iter->strText.length())
{
for (int i = 0; i < nEditLen; i++)
{
if (!((str[i] == m_iter->strText[i]) ||
(str[i] >= 'A' && str[i] <= 'Z' &&
str[i] + 'a' - 'A' == m_iter->strText[i]) ||
(str[i] >= 'a' && str[i] <= 'z' &&
str[i] - 'a' + 'A' == m_iter->strText[i])))
{
bMatch = false;
i = nEditLen;
}
}
}
else
bMatch = false;
"

Original issue reported on code.google.com by mathias....@gmail.com on 29 Sep 2010 at 8:10

GoogleCodeExporter commented 9 years ago

Original comment by mathias....@gmail.com on 29 Sep 2010 at 7:06