Drag List Items Up and Down

Scott Morrow scott at elementarysoftware.com
Fri Feb 3 00:54:23 EST 2017


Scott Rossi published "Get In Line”, a different sort of solution which involves dragging an img representation of the text line. I liked the added opportunity for visual effect that this method offered. I have used it successfully in several applications including ones in iOS. Scott talks about this stack here: 

<http://lists.runrev.com/pipermail/use-livecode//2005-January/049411.html>

You can find a working copy that is open for examination by:

1—>  go url "http://www.tactilemedia.com/tmpanel.rev”

2—>  scroll to the “DEMOS” channel  (wait for them to load… there is a bunch of great stuff here!)

3—>  scroll down to "Get In Line” and click


Scott Morrow

Elementary Software
(Now with 20% less chalk dust!)
web       http://elementarysoftware.com/
email     scott at elementarysoftware.com
office     1-800-615-0867
------------------------------------------------------


> On Feb 2, 2017, at 10:56 AM, Skip Kimpel via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Excellent... works like a charm.  Thanks for sharing!
> 
> SKIP
> 
> On Thu, Feb 2, 2017 at 1:48 PM, AndyP via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> 
>> Modified script
>> added
>> 
>> /if within (field "myField", the mouseLoc) is true then /
>> 
>> on mouseDown
>> 
>>   put word 2 of the clickLine into tcl
>>   set the textcolor of line tcl of me to "red"
>>   if line tcl of me is empty then
>>      exit mousedown
>>   end if
>>   put item 2 of the mouseLoc into tstarty
>>   put the effective textHeight of me into th
>>   repeat while the mouse is down
>>      if item 2 of the mouseLoc - tstarty > (th/2) then
>>         if within (field "myField", the mouseLoc) is true then
>>            lock screen
>>            put cr & line tcl of me after line tcl + 1 of me
>>            delete line tcl of me
>>            add 1 to tcl
>>            set the textcolor of line tcl of me to "red"
>>            add th to tstarty
>>            unlock screen
>>         end if
>>      else if tstarty - item 2 of the mouseLoc > (th/2) then
>>         if within (field "myField", the mouseLoc) is true then
>>            lock screen
>>            put line tcl of me & cr before line tcl - 1 of me
>>            delete line tcl + 1 of me
>>            subtract 1 from tcl
>>            set the textcolor of line tcl of me to "red"
>>            subtract th from tstarty
>>            unlock screen
>>         end if
>>      end if
>>         end repeat
>>   set the textcolor of line tcl of me to "black"
>>   set the hilitedLine of me to tcl
>> 
>> end mouseDown
>> 
>> 
>> 
>> -----
>> Andy Piddock
>> 
>> 
>> My software never has bugs. It just develops random features.
>> 
>> TinyIDE a Free alternative minimalist IDE Plugin for LiveCode
>> TinyIDE
>> 
>> 
>> Script editor Themer for LC http://2108.co.uk
>> 
>> PointandSee is a FREE simple but full featured under cursor colour picker
>> / finder.
>> http://www.pointandsee.co.uk  - made with LiveCode
>> --
>> View this message in context: http://runtime-revolution.
>> 278305.n4.nabble.com/Drag-List-Items-Up-and-Down-tp4712158p4712166.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode










More information about the use-livecode mailing list