How to reorder lines in a list field

André Bisseret andre.bisseret at wanadoo.fr
Sat Oct 30 10:09:27 EDT 2010


Thanks a lot Björnke for your prompt reply, and your solution. It  
works well (and very fast ;-)

André

Le 30 oct. 10 à 15:42, Björnke von Gierke a écrit :

>
> I can't help you with code from someone else that I have no  
> intention of looking at. Most likely a mouseenter or mouseleave  
> doesn't trigger, no clue. For reordering lines, there's no build in  
> way, and there are many possible ways to do it. Here's mine. It uses  
> just the list field, and is probably a bit simplistic (no floating  
> line/drag image following the mouse cursor). But it works for a  
> single selection list field.
>
> on mousedown
> put the selectedText of me into myDrag
> put the mouseLine into mySelection
> repeat while the mouse is down
>   put the mouseLine into toSelect
>   if mySelection <> toSelect and toSelect <> "" then
>     put the scroll of me into theScroll
>     put me into theText
>     put word 2 of toSelect into LinetoSelect
>     if lineToSelect = the number of lines of me then
>       delete line (word 2 of mySelection) of theText
>       put return & myDrag after line -1 of theText
>     else
>       delete line (word 2 of mySelection) of theText
>       put myDrag & return before line lineToSelect of theText
>     end if
>     put toSelect into mySelection
>     lock screen
>     put theText into me
>     set the scroll of me to theScroll
>     select line (word 2 of myselection) of me
>     unlock screen
>   end if
> end repeat
> showSettings
> end mouseDown
>
>
> On 30 Oct 2010, at 15:18, André Bisseret wrote:
>
>> Bonjour,
>>
>> I am trying to get a list field where it would be possible to  
>> reorder the lines.
>> (is there somewhere any tutorial or any solution on this?)
>
>
>
> -- 
>
> official ChatRev page:
> http://bjoernke.com?target=chatrev
>
> Chat with other RunRev developers:
> go stack URL "http://bjoernke.com/chatrev/chatrev1.3b3.rev"
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> ---------------------------------------------------------------------------------------
> Orange vous informe que cet  e-mail a ete controle par l'anti-virus  
> mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>






More information about the Use-livecode mailing list