B4J Question AS_TextFieldAdvanced - readonly not working?

wimpie3

Well-Known Member
Licensed User
Longtime User
Is it possible there is an issue with AS_TextFieldAdvanced when the read only checkbox is checked in the designer? The field is still editable when using B4J even in read-only mode...
 

wimpie3

Well-Known Member
Licensed User
Longtime User
Here you go. In B4J the edit field stays editable, even with readonly checked.
 

Attachments

  • bugtest.zip
    3.2 KB · Views: 84
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
That's why an example project is so important, so I could now see that it is a bug only in b4j and only in the multiline textfield.

is fixed in V1.43
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
OK, I've been shouting too early @Alexander Stolte ;-)

The textfield is still editable when opened in a dialog box :-( See example.
 

Attachments

  • bugtest.zip
    4.1 KB · Views: 80
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
The textfield is still editable when opened in a dialog box :-( See example.
is something i can't influence, probably the text field is set to enabled internally as soon as the panel becomes visible. Because if I set the readonly after the ShowCustom, then it works.
B4X:
    Dim pnl As B4XView = xui.CreatePanel("")
    pnl.SetLayoutAnimated(0,0, 0, 300dip, 70dip)
    pnl.LoadLayout("Dialog_Label")
    AS_TextFieldAdvanced1.Text="This is selectable text"
    dia.Initialize(Root)
    Dim rs As ResumableSub = dia.ShowCustom(pnl,"yes","no","cancel")
    AS_TextFieldAdvanced1.ReadOnly = True
    Wait For (rs) Complete (result As Int)
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
Yes that seems to work, but now I've noticed the text color of the disabled field becomes lighter? Might be a default setting in Java or something like that?
 
Upvote 0
Top