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

draggable fields?

 [1/4] 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

 [2/4] from: g:santilli:tiscalinet:it at: 14-Sep-2001 23:00


Hello Gregg! On 14-Set-01, you wrote: GI> it). Do I have to implement my own edit-text function to use? You will find EDIT-TEXT in CTX-TEXT. Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [3/4] from: greggirwin:starband at: 14-Sep-2001 15:53


Answer to self, <<...how would I make use of the edit-text routine that is, seemingly, used by the field natively? >> DOH! Simple, just poke around until you find that you have to qualify it as ctx-text/edit-text and it works fine. --Gregg

 [4/4] from: greggirwin:starband at: 14-Sep-2001 15:57


<< You will find EDIT-TEXT in CTX-TEXT. >> Thanks! Found it. --Gregg