Yep, it works well, whether its a single field or not.  The only instance
where it doesn't work correctly is if click to toggle is on (so that there
are no hilitedlines)  Focus is accepted, but no selection is made.  Of
course with click to toggle on, using arrow keys to select multiple lines
would take custom coding anyway. Your code is similar to mine, the only
addition I made was to select char 1 to 0 when no hilitedline is available.

On Wed, Jul 22, 2015 at 4:10 AM, BNig <bernd.niggem...@uni-wh.de> wrote:

> Mike Bonner wrote
> > Very weird.  I can't get arrow keys to work with any list field if the
> > selection is empty.  But hey, all that matters is that it works.
>
> Hi Mike,
>
> could you try this on a list field with a hilited line and either a second
> field that can get focus or no other field/control that can get focus and
> test if the arrowkeys work?
>
> put this code into the script of the list field
>
> ----------------------------------
> on focusIn -- when tabbing into field
>    activateLine
> end focusIn
>
> -- in case of tab but no other field/control gets focus, i.e. field is only
> focusable object beside card
> on focusOut
>    send "checkWhoIsFocused" to me in 10 milliseconds
> end focusOut
>
> on checkWhoIsFocused -- restore selection after tabbing while in only
> focusable object
>    if the focusedObject = the long id of me then
>       activateLine
>    end if
> end checkWhoIsFocused
>
> on activateLine
>    put the hilitedLine of me into tHilitedLine
>    if tHilitedLine <> "" then select line tHIlitedLine of me
> end activateLine
> ----------------------------------
>
> Kind regards
>
> Bernd
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/list-field-not-getting-arrowkey-msg-tp4694070p4694196.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to