Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 757

Getting Started with LiveCode - Complete Beginners • Re: Click doesn't register after code selects a line in a list field

$
0
0
Hi Michael,

Your current code in the input field takes the focus away from the second list field because of the

CODE:

select line 4 of fld listField1
You can avoid setting the focus to listField1 with this code that does not take focus away from the second listfield when clicking on a line in it

CODE:

on closeField   updateTitleend closeFieldon updateTitle   put me into line 4 of fld listField1   --select line 4 of fld listField1   set the hilitedLine of field listField1 to 4end updateTitle
I find it a bit unusual to do data entry using "closeField". I would do the data entry on for example using

CODE:

on returnInField   updateTitleend returnInFieldon enterInfield   returnInFieldend enterInfield
That way data entry is done and does not interfere with focus etc.
And the user sees right away what has changed (typos included) and not after the user has done anything that triggers "closeField".
Unless of course you have a special reason to use "closeField" as trigger.

Kind regards
Bernd

Statistics: Posted by bn — Sat Feb 15, 2025 11:44 am



Viewing all articles
Browse latest Browse all 757

Trending Articles