Tecuma Member Licensed User Longtime User Feb 16, 2022 #1 Hello Community, in B4J (TextArea) and B4i (TextView) I am able to disable edit and scroll a longer text. When I try the same on B4A with EditText I can disable it but then I can not scroll or I can scroll but then I can also edit. Is it possible with EditText to scroll without being able to edit the text? Best regards --Christian
Hello Community, in B4J (TextArea) and B4i (TextView) I am able to disable edit and scroll a longer text. When I try the same on B4A with EditText I can disable it but then I can not scroll or I can scroll but then I can also edit. Is it possible with EditText to scroll without being able to edit the text? Best regards --Christian
William Lancee Well-Known Member Licensed User Longtime User Feb 16, 2022 #2 I Googled. If you know how to use inline java then try the code below. I'll investigate, but I don't know how 'yet' B4X: private void disableEditText(EditText editText) { editText.setFocusable(false); editText.setEnabled(false); editText.setCursorVisible(false); editText.setKeyListener(null); editText.setBackgroundColor(Color.TRANSPARENT); } Upvote 0
I Googled. If you know how to use inline java then try the code below. I'll investigate, but I don't know how 'yet' B4X: private void disableEditText(EditText editText) { editText.setFocusable(false); editText.setEnabled(false); editText.setCursorVisible(false); editText.setKeyListener(null); editText.setBackgroundColor(Color.TRANSPARENT); }
Tecuma Member Licensed User Longtime User Feb 16, 2022 #3 Thank you for your hint. I found a library. I guess I will test this one. Upvote 0
William Lancee Well-Known Member Licensed User Longtime User Feb 16, 2022 #4 Simple! In designer set multiline (single line off) and InputType to "NONE". Works like magic. or in code B4X: EditText1.InputType = EditText1.INPUT_TYPE_NONE EditText1.SingleLine = False Last edited: Feb 16, 2022 Upvote 0
Simple! In designer set multiline (single line off) and InputType to "NONE". Works like magic. or in code B4X: EditText1.InputType = EditText1.INPUT_TYPE_NONE EditText1.SingleLine = False
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2022 #5 xCLV is another option for scrollable text. Upvote 0
Tecuma Member Licensed User Longtime User Feb 17, 2022 #6 @William Lancee Thank you. I will test it. @Erel Thank you. This will be the fallback. Upvote 0
William Lancee Well-Known Member Licensed User Longtime User Feb 17, 2022 #7 @Erel wrote xCLV is another option for scrollable text. Click to expand... So is BBCodeView. Upvote 0
Tecuma Member Licensed User Longtime User Feb 19, 2022 #8 I tested it today. Works perfectly ? Upvote 0