Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Detecting the Enter key in a field

From: greggirwin:mindspring at: 24-Jun-2002 15:49

Hi Brock, << I used the below code from feel.html to get me started; ... But can't seem to get this same type of functionality to work with a 'field instead of a box. >> I'm not sure exactly what you're after. If you just substitute FIELD for BOX, you should get the same results. The catch, of course, is that you've replaced feel/engage for field, which may not be what you want to do. You can see the FEEL and EDIT-TEXT functions that are used to support it with: probe get in ctx-text 'edit and probe get in ctx-text 'edit-text You can write your own feel/engage and in the key handling part, call ctx-text/edit-text then do any extra processing you want to do. If you want to change the behavior (e.g. not lose focus on enter) you would check the keys before calling ctx-text/edit-text. HTH! --Gregg