On Wed, Aug 27, 2008 at 3:20 PM, Hugh Sasse <[EMAIL PROTECTED]> wrote:

> Can someone tell me how to trap the return key being pressed in
> the edit_line? I can't seem to get it with change{} or edit_line{}.
> I'd like to make it the same as a button press in some apps.

Detect \n as the last character during the change block. I like this
style right now:

edit_line do |x|
  if x.text.chomp!
    # return'd
  else
    # normal type fiddling
  end
end

-- 
Seth Thomas Rasmussen
http://greatseth.com

Reply via email to