Moving text from scrolling list to another field
Posted: Wed Jun 12, 2013 9:57 pm
I have a scrolling field with entries and have been reading the dictionary, but cannot seem to solve this simple task.
I am trying to move the line clicked on by the user into a field (txtTitle).
The dictionary for "clickLine" says:
If the field is locked, the clickLine function is most useful within a handler (such as mouseDown or mouseUp) that is triggered by the mouse click.
If the field is unlocked, mouseDown and mouseUp messages are not sent when the user clicks in the field (unless the user right-clicks or holds down the Control key while clicking). Use the clickLine function within a selectionChanged handler to determine what line the user is editing in an unlocked field.
Here is my "mouseUp" code
on mouseUp
set the lock of field "lbxTitle" to true
put the value of the clickLine into theLine
set the text of field "txtTitle" to theLine
set the lock of field "lbxTitle" to false
end mouseUp
When I comment out the last line and check the properties for "lbxTitle" after the mouseUp, the Lock Text box is not checked (not locked).
If I use the Ctrl key + mouse click over a line in the scrolling field, the LINE moves into the "txtTitle". This matches the dictionary for an "unlocked" field.
Thanks for the help
bill
I am trying to move the line clicked on by the user into a field (txtTitle).
The dictionary for "clickLine" says:
If the field is locked, the clickLine function is most useful within a handler (such as mouseDown or mouseUp) that is triggered by the mouse click.
If the field is unlocked, mouseDown and mouseUp messages are not sent when the user clicks in the field (unless the user right-clicks or holds down the Control key while clicking). Use the clickLine function within a selectionChanged handler to determine what line the user is editing in an unlocked field.
Here is my "mouseUp" code
on mouseUp
set the lock of field "lbxTitle" to true
put the value of the clickLine into theLine
set the text of field "txtTitle" to theLine
set the lock of field "lbxTitle" to false
end mouseUp
When I comment out the last line and check the properties for "lbxTitle" after the mouseUp, the Lock Text box is not checked (not locked).
If I use the Ctrl key + mouse click over a line in the scrolling field, the LINE moves into the "txtTitle". This matches the dictionary for an "unlocked" field.
Thanks for the help
bill