Edit control
-
Hello I´m trying to do this : A user starts to write his username in an editcontrol, and as he types Im searching in a database finding any coincidences with other data I have... If found one i will show it in other editcontrol else I will disable it. So at what event from the editcontrol should I put my code? EN_UPDATE ? EN_CHANGE ? or this is not the best way..? thx in advance...
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
-
Hello I´m trying to do this : A user starts to write his username in an editcontrol, and as he types Im searching in a database finding any coincidences with other data I have... If found one i will show it in other editcontrol else I will disable it. So at what event from the editcontrol should I put my code? EN_UPDATE ? EN_CHANGE ? or this is not the best way..? thx in advance...
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
Hi, I'm not sure what the appropriate events / method is to use but in JavaScript I use onKeyPress and filtering thought the database. Can't think of anything else.... Hope this might spark something in your brain .... lol .... :)
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Hello I´m trying to do this : A user starts to write his username in an editcontrol, and as he types Im searching in a database finding any coincidences with other data I have... If found one i will show it in other editcontrol else I will disable it. So at what event from the editcontrol should I put my code? EN_UPDATE ? EN_CHANGE ? or this is not the best way..? thx in advance...
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
EN_CHANGE
-
EN_CHANGE
thx :)
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
-
Hello I´m trying to do this : A user starts to write his username in an editcontrol, and as he types Im searching in a database finding any coincidences with other data I have... If found one i will show it in other editcontrol else I will disable it. So at what event from the editcontrol should I put my code? EN_UPDATE ? EN_CHANGE ? or this is not the best way..? thx in advance...
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
can't you try both and see which one fits you best ? also, reading the MSDN about those events may help !
You don't know where to start ? ask a good friend
-
can't you try both and see which one fits you best ? also, reading the MSDN about those events may help !
You don't know where to start ? ask a good friend
Im on it testing both, just wanted to know a better way. thx
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
-
EN_CHANGE
it will work but might not be practical if the search in the DB takes a long time. user types "a" waits for a few seconds, user types "c" waits for a few seconds, user types backspace because he wanted to type "v" instead, waits a few seconds, user types "v" ...
Maximilien Lincourt Your Head A Splode - Strong Bad
-
Hello I´m trying to do this : A user starts to write his username in an editcontrol, and as he types Im searching in a database finding any coincidences with other data I have... If found one i will show it in other editcontrol else I will disable it. So at what event from the editcontrol should I put my code? EN_UPDATE ? EN_CHANGE ? or this is not the best way..? thx in advance...
--------------------------------------------- "Don't panic!. All will become clear in time" WYS Is Not always WYG
jarleydg wrote:
So at what event from the editcontrol should I put my code? EN_UPDATE ? EN_CHANGE ?
The former is sent before the control us updated, whereas the latter is sent after.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
it will work but might not be practical if the search in the DB takes a long time. user types "a" waits for a few seconds, user types "c" waits for a few seconds, user types backspace because he wanted to type "v" instead, waits a few seconds, user types "v" ...
Maximilien Lincourt Your Head A Splode - Strong Bad
Maximilien wrote:
it will work but might not be practical if the search in the DB takes a long time.
I agree. That's why I chose EN_CHANGE - at least the user will see the character typed before it goes off and searches :)