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

William de Smet williamdesmet at
Tue Apr 13 07:15:02 EDT 2021

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.

How do I adapt this code I made? (this obviously only returns the first
char of the text in red)

on changeColor
mobileControlDo "field1", "focus", true
put mobileControlGet ("field1", "text") into tText
put char 1 of tText into tColor
mobileControlSet "field1" , "text", "" & tColor
mobileControlSet "field1", "textcolor", "255,0,0"
on changeColor



More information about the use-livecode mailing list