> I have searched hi & lo for any reference to editing text using a drag n
> drop technique similiar to a standard text editor ie hilite,drag and insert
> at mousepoint.
> I have an idea of a work around, but I don't want to spend hours reinventing
> the wheel.
> The text is a series of filepaths assembled using fileIO and I just want to
> let the user alter their import order prior to importing.

Well, I don't know what you intend as a workaround, but you'll need to do
some custom coding. Shouldn't be too difficult, though.

It sounds like you just want to be able to move individual lines around. So,
on mouseDown, query for the line using pointToLine() or a similar function,
drop the text of said line into another text member which you then put on
stage under the mouse, delete the line from the original member, and have
the new text follow the mouse around while still down. Then query for the
new line on mouseUp, and drop the text in. The following is rough, and a bit
hardcoded (and you might want to use a mouseUp event instead of the repeat
while mouseDown), but here's a behavior:

on mouseDown me
  myLine = pointToLine(sprite me.SpriteNum, the mouseLoc)
  member("dragText").text = sprite(me.SpriteNum).member.line[myLine]
  sprite(2).member = member("dragText")
  sprite(2).loc = the mouseLoc
  sprite(me.SpriteNum).member.line[myLine].delete()
  repeat while the mouseDown
    sprite(2).loc = the mouseLoc
    updatestage
  end repeat
  if the mouseV < sprite(me.SpriteNum).bottom then
    if the mouseV > sprite(me.SpriteNum).top then
      myLine = pointToLine(sprite me.SpriteNum, the mouseLoc)
    else
      myLine = 1
    end if
  else
    myLine = sprite(me.SpriteNum).member.line.count
  end if
  sprite(me.SpriteNum).member.line[myLine] =  member("dragText").text &
return & sprite(me.SpriteNum).member.line[myLine]
end

-Kurt


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to