B4J Question ScrollBar TextArea

Erel

B4X founder
Staff member
Licensed User
Longtime User
This code will partially hide it:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.Show
   TextArea1.Initialize("")
   MainForm.RootPane.AddNode(TextArea1, 10, 10, 200, 200)
   CallSubDelayed2(Me, "DisableScrollBar", TextArea1)
End Sub

Sub DisableScrollBar(ta As TextArea)
   Dim jo As JavaObject = ta
   Dim scrollbar As JavaObject = jo.RunMethod("lookup", Array(".scroll-bar:vertical"))
   Dim d As Double = 0
   scrollbar.RunMethod("setOpacity", Array(d))
End Sub
I wasn't able to hide it completely.
 
Last edited:
Upvote 0

BeneBarros

Active Member
Licensed User
Longtime User
thank you, works perfectly.
as I am using in various TextArea only changed the line
Dim jo as JavaObject = TextArea1
to
Dim jo as JavaObject = ta
 
Upvote 0
Top