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

[REBOL] draggable fields?

From: greggirwin::starband::net at: 14-Sep-2001 10:45

Hi All, I'm playing with an example from the how-to on handling user interface events, and I have a question. If I wanted to implement a draggable field (i.e. a field which can be moved around), how would I make use of the edit-text routine that is, seemingly, used by the field natively? To handle the dragging part of the process, I can scavenge from their example code. Not a problem. Now, the key events still come in, as I can print them, but all the normal edit functionality is bypassed and I can't seem to find the edit-text function anywhere (and nothing happens if I call it). Do I have to implement my own edit-text function to use? view layout [ style dragfield area 200x40 font-size 11 feel [ engage: func [face action event] [ if action = 'down [ face/data: event/offset remove find face/parent-face/pane face append face/parent-face/pane face ] if find [over away] action [ face/offset: face/offset + event/offset - face/data show face ] if action = 'up [ focus face ] if action = 'key [ print event/key ;[edit-text face event get in face 'action] ] ] ] dragfield "Field 1" dragfield "Field 2" dragfield "Field 3" dragfield "Field 4" ] Thanks for any tips! --Gregg