list field not getting arrowkey msg
BNig
bernd.niggemann at uni-wh.de
Wed Jul 22 09:40:25 EDT 2015
Mike, thanks for testing.
this thread made me aware of the problem and I think I will incorporate the
code into my list field.
Kind regards
Bernd
Mike Bonner wrote
> 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.niggemann@
> > 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-tp4694070p4694201.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list