On Mon, Jul 13, 2009 at 11:31:55AM +0800, tim awa wrote: > I wanted to trap a particular keystroke while in a grid column and > replace it with a two keystroke combination. > >[snip] > How to do this in Dabo?
I don't understand the VFP code - never having used it myself, but you can do this by trapping the onKeyUp/Down or onKeyChar event methods. You'll need to import the wx module though to have access to the symbolic keycode names. I've got this code in one of my Textfields to force what is effectively a save/new cycle. (addEntry is custom method I've added to the form). def onKeyChar(self, evt): print evt._eventData if evt.keyCode == wx.WXK_RETURN: self.Form.addEntry() -- Roger. Home| http://www.sandman.uklinux.net/ Master of Peng Shui. (Ancient oriental art of Penguin Arranging) Work|Independent Sys Consultant | http://www.computer-surgery.co.uk/ New key Fpr: 72AF 0ACC 9A53 E59F B1B6 DC14 1983 A13E 5C3D 3CEB _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/20090713095353.ga28...@computer-surgery.co.uk