Help with cursor on textbox (1 Viewer)

gojets1721

Registered User.
Local time
Yesterday, 16:00
Joined
Jun 11, 2019
Messages
430
I have a textbox where I don't want the cursor to change to insertion cursor; I want it to remain the pointer when hovering over the textbox.

I placed 'screen.MousePointer = 1' in the Move Mouse event of the textbox, which worked.

However, after you hover over that textbox, the pointer cursor is used for everything else from there on out. I only want the insertion cursor to not appear only when hovering over that textbox. Any suggestions on how to accomplish that?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:00
Joined
Feb 19, 2013
Messages
16,616
easiest way is in the section and/or surrounding controls mouseover event return the pointer to whatever it was before
 

KitaYama

Well-known member
Local time
Today, 08:00
Joined
Jan 6, 2022
Messages
1,541
Do you need to edit the contents of the text box?
If you set the textbox property Enabled=No & Locked=Yes the cursor doesn't change.
You don't need to use code.
 

gojets1721

Registered User.
Local time
Yesterday, 16:00
Joined
Jun 11, 2019
Messages
430
Do you need to edit the contents of the text box?
If you set the textbox property Enabled=No & Locked=Yes the cursor doesn't change.
You don't need to use code.
No, I don't need to edit the contents, but putting Enabled to 'no' then doesn't allow you to double click on the textbox to trigger an event
 

gojets1721

Registered User.
Local time
Yesterday, 16:00
Joined
Jun 11, 2019
Messages
430
easiest way is in the section and/or surrounding controls mouseover event return the pointer to whatever it was before
@CJ_London gotcha. Is there a way to have code to 'reset' it so to speak? Meaning revert back to default where it'll be a pointer or insertion as it normally would be?
 

Josef P.

Well-known member
Local time
Today, 01:00
Joined
Feb 2, 2023
Messages
827
but putting Enabled to 'no' then doesn't allow you to double click on the textbox to trigger an event
You could put a transparent button over the inactive textbox and use its events.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:00
Joined
Feb 19, 2013
Messages
16,616
if you want to emulate mouseover then take a look at this thread I did a while back


note for continuous forms you need to use a completely different method if you only want to highlight a specific control on a specific row
 

Users who are viewing this thread

Top Bottom