Page 1 of 1
List field problem
Posted: Mon Sep 26, 2011 5:53 pm
by Happyrever
Example,
I have a simple list field of 4 items where the user clicks a line to select an item.
I have used
Put empty into line 4 of field "Index"
to remove all content in that last line.
However, line 4 is still selectable and this is undesireable.
How can I prevent the deleted line from highlighting or being selectable?
Re: List field problem
Posted: Mon Sep 26, 2011 6:13 pm
by Dixie
Happyrever...
put this into the script of your listfield and it will delete the line that you click on...
Code: Select all
on mouseDown
put word 2 of the clickline into theLineToDelete
delete line theLineToDelete of me
end mouseDown
be well
Dixie
Re: List field problem
Posted: Mon Sep 26, 2011 6:24 pm
by Happyrever
I dont understand the code. I tried it and it wipes out the whole list. I does however leave the list without any selectable lines.
Perhap not quite what I was expecting. what was the logic behind the code?
Re: List field problem
Posted: Mon Sep 26, 2011 6:57 pm
by Dixie
Happyrever...
If everything is being deleted when you click on a line in the field, then all of the content that you have in that field must be one long line... I have attached a stack that uses the script I posted earlier... It works here...

If you click on a line then it is deleted... isn't that what you wanted to happen ?.. I would also suggest having a look at the 'clickline' entry in the dictionary..
hope it helps...
Dixie
Re: List field problem
Posted: Tue Sep 27, 2011 10:10 am
by Happyrever
I do appreciate your time and trouble with your reply, however, you have assumed incorrectly that the user clicks the line in question to delete it.
The line in question i.e. the one with the problem, is always the last item in the list plus 1
Take your example. If you click one of the middle numbers, a blank line is created in that position and the remaining numbers do not move.
In my case, the line clicked causes the numbers below it to move up and no blank line is created. The original item at the end of the list has moved up and there is a blank line where it used to be. The blank line is still highlited and selectable and this is not acceptable.
Answer number of lines in field "Index"
shows the correct answer; the visible list items and not the blank but selectable line that causes the problem.
Do you have an answer to tidy up the offending blank line?
Re: List field problem
Posted: Tue Sep 27, 2011 10:51 am
by Happyrever
Problem resolved!
Re: List field problem
Posted: Tue Sep 27, 2011 10:56 am
by Dixie
I'm happy that you sorted it as your explanation has left me now totally confused...
be well
Dixie
Re: List field problem
Posted: Tue Sep 27, 2011 2:29 pm
by dunbarx
I think the simple miscommunication was that at first Happyrever put empty into the line, whereas dixie, correctly, advised him to delete that line. There is a difference, of course.
Things went downhill from there, and the clicking was likely at fault, but all ended happily.
Craig Newman