> I need some info on doing a dropdown list. I looked in the help in D7.02
and in my library of books and still can not find anything about how to do
it. Can some one pass some info on this subject to me.
>

I had a similar problem recently and found some examples but they were
rather cumbersome so I came up with the following simple but effective
solution to use an adjustable field. I also added a separate behaviour to
hilight the text at the mouse position. As this is the first time I have
felt able to give some help back for all the help I have had from the list
someone will probably have a much better solution and may think this is a
bit crude but it is simple and it worked for me so I hope it is of use to
someone.

global selectedItem
property pLine
property pClicked
on mouseenter me
  pClicked = "your default text"
  member("field for dropdown").text = ""  -- make sure boxtype is set to
adjust
  member("field for dropdown").text = member("list to display as dropdown
items").text
  selectedItem = pClicked
end

on mouseleave me
  member("field for dropdown").text = pClicked
end

on mouseUp me
  pline = pointtoline(sprite(the clickon), the mouseloc)
  pClicked = member(sprite(the clickon).membernum).line[pline]
  member("field for dropdown").text = pClicked
  selectedItem = pClicked
end

HTH
Alan Robinson


[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