How do I change the textcolor of the selected text in a native iOS field?

Ingar Roggen ingar.roggen at sosiologi.uio.no
Thu Apr 15 18:26:34 EDT 2021


________________________________________
From: use-livecode <use-livecode-bounces at lists.runrev.com> on behalf of J. Landman Gay via use-livecode <use-livecode at lists.runrev.com>
Sent: 15 April 2021 21:44
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: How do I change the textcolor of the selected text in a native iOS field?

Yeah, I'm afraid you're right. I don't see any way set set a property on a range of characters
in a native input control. If the app doesn't strictly need copy/paste you could probably use a
LC field instead.

On 4/14/21 12:22 PM, William de Smet via use-livecode wrote:
> Thanks for pointing me to "selectedRange".
>
> put mobileControlGet ("field1", "selectedRange") into myTest
> -- answer myTest  //gives range 1,5
> mobileControlSet "field1", "textColor", "255,0,0"
>
> This doesn't work because all text will be colored and not just the
> selectedRange.
>
>
> greetings,
>
> William
>
>
>
>
> Op di 13 apr. 2021 om 21:11 schreef J. Landman Gay via use-livecode <
> use-livecode at lists.runrev.com>:
>
>> On 4/13/21 6:15 AM, William de Smet via use-livecode wrote:
>>> Hi there,
>>>
>>> How do I get the selectedText of a native iOS field?
>>> I want to change the color of the text selection in the field.
>>
>> I think you want "selectedRange" which returns the start index and the
>> length of the text
>> selected. Judging from the dictionary it looks like it only works on
>> multiline fields.
>>
>>
>> --
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list