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

[REBOL] Inline edit field

From: henrik:webz:dk at: 25-Feb-2004 21:01

Hi I'm trying to put together a real inline edit field, such as the one used in spreadsheets or in the Windows file requester when renaming a file, and I can't find anything related directly to what I want to do. Basically I'm using a button and change the feel to that of a field and I want the Enter key, tab, escape or clicking outside the field to revert the feel to button with new contents. It seems that ctx-text/edit makes the field editable, but I can't figure out how to make it behave as a single line edit field and how to get out of the editing state again in a simple fasion. Probing the feels of the button, field and textarea gadgets with: layout [r: button] probe r/feel layout [r: field] probe r/feel layout [r: textarea] probe r/feel reveals the code to do this, and I can't figure out how field captures an enter or tab key to unfocus the field, where a textarea sets it to a new line. The button behaves the same way. Any ideas? I'm using the latest beta 1.2.40 to test this. -- Regards, Henrik Mikael Kristensen