Disabling Highlight Drag in TextBox? (1 Viewer)

-ian-

Registered User.
Local time
Today, 14:28
Joined
Apr 12, 2002
Messages
32
Hi all,

I have a form with textboxes whose data is automatically filled in when the form loads.

I need to have the click-event on the textbox open to me so the user can select this text as an option, but I don't what any text in the box to highlight with the cursor when they -do- click on it.

So, in essense I'd like the text box to -look- disabled, but have the click event enabled.

Any clues out there?
 

bjackson

Registered User.
Local time
Today, 23:28
Joined
Jan 3, 2003
Messages
404
i havent tried this but it may work

in your on enter event try
setting back colors and forecolours to suit your style, then
set cursor to the end of the text so that it is not selecting any
of the text

me[Cotrolname].SelStart = me[Controlname].SelLength
 

-ian-

Registered User.
Local time
Today, 14:28
Joined
Apr 12, 2002
Messages
32
Using the -On Enter- event -Thats it!

I tried moving the cursor to the end of the text, using Selstart and SelLength and that didn't help, but I noticed that the code was activated when the mouse was pressed rather than when it was depressed.

So, I shifted the focus of the control off the textbox instead,

Private Sub Answer1_Box_Enter()
Option_A.Value = Not (Option_A.Value)
Cmd_Next.SetFocus
End Sub

Thankyou bjackson,

Ian.
 

Users who are viewing this thread

Top Bottom