Page 1 of 1

Senior moment memory block

Posted: Mon Feb 24, 2014 8:53 am
by MikeinHawaii
Hi all, my question: What is the handler name for picking a line in a scrolling list field"
I thought it was menuPick, but I have been having zero luck picking a line out of a three line scrolling field using it.
My script for the field is as follows:

On menuPick theItem
If it is "Choice 1" then go to card 1
else if it is "Choice 2" then go to card 2
else quit
end menuPick

Won't do anything. Please help.

Re: Senior moment memory block

Posted: Mon Feb 24, 2014 9:29 am
by Dixie

Code: Select all

on mouseDown
   put word 2 of the clickline into theChoice
   put line theChoice of me
end mouseDown
or

Code: Select all

on mouseDown
   put line (word 2 of the clickline) of me
end mouseDown

Re: Senior moment memory block

Posted: Mon Feb 24, 2014 10:32 am
by MikeinHawaii
Thanks Dixie. Yea I found clickLine just before returning here but after you posted your reply.

Here is how I got it to go:

on mouseUp
put the value of the clickLine into textOfClickedLine
put textOfClickedLine into fld "Whatever's"
end mouseUp


But thanks anyhow for helping.

Re: Senior moment memory block

Posted: Mon Feb 24, 2014 4:24 pm
by dunbarx
Mike.

Just so.

"MenuPick" is a message sent with such controls as comboBoxes and pullDowns. It is a menu-based message. A list field is just a field. It responds to mouse events, as you have discovered.

Craig Newman

Re: Senior moment memory block

Posted: Mon Feb 24, 2014 4:33 pm
by Klaus
Hi Mike,

or this way (in the list field script):

Code: Select all

on mouseup
  put the selectedtext of me into fld "Display the user selection"
end mouseup

Best

Klaus