On Jan 31, 2009, at 4:35 PM, Roger Lovelock wrote:

> Tried the following line to also add in the 'Press ESC option :
>  self.AccountCodeDDL.bindKey("esc",self.DeleteDDL)
> It doesn't seem to have any effect - is this wrong or is there a  
> better way?


        It looks fine, so I would do some simple tests to figure out what  
what's going on. You might try binding other keys to see if they have  
any effect. You could also bind the KeyChar event as follows:

self.AccountCodeDDL = dabo.ui.dListBox(self.fp, Width=60, Height=200,
        Left=0, Top=0, ValueMode="Key", Choices=codes, Keys=keys,
        OnHit=self.DDLClick, OnLostFocus=self.DeleteDDL,  
OnKeyChar=self.keyHandler)

followed by:

def keyHandler(self, evt):
        if evt.keyCode == 27:
                # Escape
                self.DeleteDDL()


-- Ed Leafe




_______________________________________________
Post Messages to: [email protected]
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/[email protected]

Reply via email to