B4J Question ScrollBar TextArea

Erel

Administrator
Staff member
Licensed 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:

BeneBarros

Active Member
Licensed 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
 
Top