B4J Question TextArea ReadOnly

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
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.

Code:
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
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: 505
Upvote 0
SOLVED

I`ve found the solution:

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

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