Help with TextBox 
Author Message
 Help with TextBox

Hello.

I have a textbox and I dont want the user to be allowed to click in, or to
be allowed to select some text inside. In fact I whish he had no control on
it.

How can I do ?

Thank you.



Fri, 28 Dec 2001 03:00:00 GMT  
 Help with TextBox
Use a Label...

--

Have a good day.
Don

Quote:

>Hello.

>I have a textbox and I dont want the user to be allowed to click in, or to
>be allowed to select some text inside. In fact I whish he had no control on
>it.

>How can I do ?

>Thank you.



Fri, 28 Dec 2001 03:00:00 GMT  
 Help with TextBox
Don is right, you know. You should use a Label instead - but if you maybe
just want to temporarily lock the user out of the TextBox (and need it to be
used normally at other times) then have a look at the "locked property".
This will prevent the user entering or pasting stuff into it:

Text1.Locked = True

If you want to, you can also prevent the text cursor from appearing when the
user clicks the TextBox. Just set the focus to an unused control which is
positioned off the Form (use negative left or top values) so that it cannot
be seen. The unused control can be any control which is capable of getting
focus:

Private Sub Text1_GotFocus()
Picture1.SetFocus
End Sub

Mike


Quote:
> Hello.

> I have a textbox and I dont want the user to be allowed to click in, or to
> be allowed to select some text inside. In fact I whish he had no control
on
> it.

> How can I do ?

> Thank you.



Fri, 28 Dec 2001 03:00:00 GMT  
 Help with TextBox
or why not just disable it?
text1.enable = false
Quote:

> Hello.

> I have a textbox and I dont want the user to be allowed to click in, or to
> be allowed to select some text inside. In fact I whish he had no control on
> it.

> How can I do ?

> Thank you.



Fri, 28 Dec 2001 03:00:00 GMT  
 Help with TextBox
I have created a lot of detail editing forms, and usually
use a combination of labels and textboxes.  The fastest
method (I find) is to use two frames, one containg the
detail labels (frmLabels), one with the textboxes
(frmTextboxes).

In edit mode, frmTextboxes is populated with the caption
properties from frmLabels, then made visible, while
frmLabels is made invisible.

When editing is complete, I reverse the process (and update
any databases if applicable).

-b

**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****



Fri, 28 Dec 2001 03:00:00 GMT  
 Help with TextBox
you can us "locked"

text1.locked = true

the only thing you can do with this one is that you can copy it

but I would disable it

text1.enabled = false



Sun, 30 Dec 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Help! Need help with TextBox Cntrl

2. Help in Textbox

3. Help with textbox/rich scrolling to a position

4. HELP Formatting TextBox for whole numbers

5. need help with textbox validation problem

6. Help with textbox & date please

7. Newbie Needs Help on Textbox

8. Newbie needs help with TextBox

9. Please help with TextBox / Label properties

10. Help: Custom TextBox and ComboBox control issue

11. help with textbox

12. Help on textbox change event anomolies

 

 
Powered by phpBB® Forum Software