B4J Question Mouse pointer becomes difficult to see when hovering over textarea

kostefar

Active Member
Licensed User
Longtime User
Dear All,

I have a rather large textarea in a form, that when hovering over it, the mouse pointer gets replaced by a very thin small vertical line, which is very difficult to see.
There´s nothing special about anything here really, in AppStart loading of the form is called with:

B4X:
Console.Show

Where Console.Show looks like:

B4X:
Public Sub Show
    
        frm.Initialize("frm", 950, 730)
        frm.RootPane.LoadLayout("Console")
        Dim consoleform As Form = frm
        consoleform.Stylesheets.Add(File.GetUri("", "style.css"))
        frm.Show
    

    
End Sub

In the designer all I amended was the color in background properties (which turns out to be a totally different color btw, but that´s rather unimportant right now cause all I want is that I can work with things) and of course the size of the form. And no, the color of background and mouse pointer are totally different.. Like bottle green and white.

I cannot post a screenshot of the mouse pointer replacement because it disappears when on the screenshots..
 

kostefar

Active Member
Licensed User
Longtime User
You can change the cursor with:
B4X:
TextArea1.MouseCursor = fx.Cursors.HAND

Thanks, but this did not change anything. It still shows a crosshair (that´s what I ment before). I even tried creating an empty project, adding a textarea in the designer, and only adding Textarea1.MouseCursor = fx.Cursors.HAND in AppStart. Still showing a crosshair.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
If Textarea1 is in the layout Console, then each time you call the Show sub it will be creating a new TextArea1 Object and the assignment of the cursor will have been lost.
 
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
If Textarea1 is in the layout Console, then each time you call the Show sub it will be creating a new TextArea1 Object and the assignment of the cursor will have been lost.

In fact I only call Show one time, in appstart, after which I add the the hand cursor.

B4X:
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
Dim textarea1 As TextArea
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
    MainForm.Show
    textarea1.MouseCursor = fx.Cursors.HAND
End Sub

'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    Return True
End Sub
 
Last edited:
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Upvote 0

kostefar

Active Member
Licensed User
Longtime User
Upvote 0
Top