|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Event order problemI've got a problem with the order of events in a textbox. The order of
events seems to occur like this when I press esc: tb1.leave tb1.validate tb1.lostfocus tb2.gotfocus tb1.keyup tb1 and tb2 being textboxes. something like that. Why is my keyup event not processed first? I need to get that first to handle stuff like Escape and Return so I can check/undo/cancel stuff. Is there a setting I missed? -- Rinze van Huizen C-Services Holland b.v Hi do you use the keydown of tb1 to check if esc is pressed and then set the
focus to tb2? Because then I'm surprised that tb1 would fire his keyup event. But I'm not completly sure what you want by reading your explanation. Greetz Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "C-Services Holland b.v." <c**@REMOVEcsh4u.nl> schreef in bericht news:WI6dnT-nT-a82kLeRVny2g@zeelandnet.nl... > I've got a problem with the order of events in a textbox. The order of > events seems to occur like this when I press esc: > > tb1.leave > tb1.validate > tb1.lostfocus > tb2.gotfocus > tb1.keyup > > tb1 and tb2 being textboxes. > > something like that. Why is my keyup event not processed first? I need > to get that first to handle stuff like Escape and Return so I can > check/undo/cancel stuff. Is there a setting I missed? > > -- > Rinze van Huizen > C-Services Holland b.v I do not fire any events by myself. Apparently if you press enter in a
textbox it will automatically set focus to the next control and it does this before the keydown/press/up event is fired. I am working on a special datacolumn to suit our needs and insert a modified sle when the user wants to edit something in the grid. When they press enter or esc the focus is removed, switched to the next textbox (not my own but the datagrid's textbox) and then that box fires it's gotfocus event and only then the keyup event seems to register. I expected the keypress events to occur first but apparently they get moved to the back of the row. Currently I've solved my little problem by implementing it a different way, but the order of events is still a mystery to me. Maybe it's something to do with the datagrid, I'll see if I can whip up an example and hope I can get it here because this computer is disconnected from our internal network. Peter Proost wrote: > Hi do you use the keydown of tb1 to check if esc is pressed and then set the > focus to tb2? Because then I'm surprised that tb1 would fire his keyup > event. But I'm not completly sure what you want by reading your explanation. > -- Rinze van Huizen C-Services Holland b.v Hi,
a sample would be nice because I can't seem to reproduce the behavior you get Greetz Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "C-Services Holland b.v." <c**@REMOVEcsh4u.nl> schreef in bericht news:orudnUB5atIk9H3eRVny2g@zeelandnet.nl... > I do not fire any events by myself. Apparently if you press enter in a > textbox it will automatically set focus to the next control and it does > this before the keydown/press/up event is fired. I am working on a > special datacolumn to suit our needs and insert a modified sle when the > user wants to edit something in the grid. When they press enter or esc > the focus is removed, switched to the next textbox (not my own but the > datagrid's textbox) and then that box fires it's gotfocus event and only > then the keyup event seems to register. I expected the keypress events > to occur first but apparently they get moved to the back of the row. > > Currently I've solved my little problem by implementing it a different > way, but the order of events is still a mystery to me. Maybe it's > something to do with the datagrid, I'll see if I can whip up an example > and hope I can get it here because this computer is disconnected from > our internal network. > > Peter Proost wrote: > > Hi do you use the keydown of tb1 to check if esc is pressed and then set the > > focus to tb2? Because then I'm surprised that tb1 would fire his keyup > > event. But I'm not completly sure what you want by reading your explanation. > > > > -- > Rinze van Huizen > C-Services Holland b.v |
|||||||||||||||||||||||