G GuyBooth Active Member Licensed User Longtime User May 26, 2020 #1 With the TextField as a TextField object I can arrange for the cursor to be located at the end of the text after a RequestFocus - For example: B4X: txfCollectionName.RequestFocus txfCollectionName.SetSelection(txfCollectionName.Text.Length, txfCollectionName.Text.Length) With a TextField as a B4XView object, the .SetSelection method is not available. Is there some way with a B4XView textfield to achieve this?
With the TextField as a TextField object I can arrange for the cursor to be located at the end of the text after a RequestFocus - For example: B4X: txfCollectionName.RequestFocus txfCollectionName.SetSelection(txfCollectionName.Text.Length, txfCollectionName.Text.Length) With a TextField as a B4XView object, the .SetSelection method is not available. Is there some way with a B4XView textfield to achieve this?
Erel B4X founder Staff member Licensed User Longtime User May 27, 2020 #2 Number #1 rule of B4XView: if something is missing then cast it to the native view: B4X: Dim tf As TextField = B4XView12 tf.SetSelection(..) Upvote 0
Number #1 rule of B4XView: if something is missing then cast it to the native view: B4X: Dim tf As TextField = B4XView12 tf.SetSelection(..)