B4J Question TextArea ReadOnly

Firpas

Active Member
Licensed User
Longtime User
It isn't a solution for me because the content must be changed by code.
I only want I want to prevent user intervention
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
It isn't a solution for me because the content must be changed by code.
I only want I want to prevent user intervention
Use a global boolean variable to check if the content was changed by code.

B4X:
Sub taName_TextChanged (Old As String, New As String)
    If Not(mChangedByCode) Then
        If New <> Old Then
            taName.Text = Old
        End If
    End If
End Sub

mChangedByCode = True
taName.Text = "xyz"
 
Upvote 0

Firpas

Active Member
Licensed User
Longtime User
I need to scroll.

I've seen the property "Editable" as Boolean in Javafx Scene Builder, but it not exist in the internal designer.

It may be possible with some method of Java Object?
 

Attachments

  • Sin título-1.png
    Sin título-1.png
    63.6 KB · Views: 216
Upvote 0

Firpas

Active Member
Licensed User
Longtime User
SOLVED

I`ve found the solution:

B4X:
Sub asJavaObject(j As JavaObject) As JavaObject
    Return j
End Sub

asJavaObject(TxtObjPlan).RunMethod("setEditable", Array(False))
 
Upvote 0
Top