Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to "lock" a mask edit control? 1

Status
Not open for further replies.

logo

Programmer
Aug 22, 2001
56
0
0
US
Does anyone know a way to give a mask edit control a "lock" attribute? I am currently using the enable attribute--but this "dims" my text (and I don't want it to dim). Is there a work around for this problem?
 
Why not do what you are doing now just go into the mask edit properites and change the colour under BackColor and pick what you want the inactive or shaded part to be.

Just an idea.

Joanne
 
You can remember the data from the mask comtrol in the
mskeditbox.Tag and restore it every time in the mskeditbox_change() event. May be it'd help.
 
What I am trying to do is get the mskeditbox to work as if it has a "lock" property. Right now it is on a form with several text and cmb boxes. I can lock the text and combo boxes, but I have to "disable" the mskedit boxes (to keep users from changing the data)--which makes them stand out (since the text is dimmed).

I have not found a way to change the "disabled" font color...if I could do this, then that would solve the problem.

Jumping back and forth between a text box and a mskeditbox defeats the purpose of using a mskeditbox.

 
Irene - that is a good thought. . .I will probably do just that until I can find a better alternative.
 
Go to the keypress event of your masked edit and type KeyAscii=0
Then the user can press the keyboard till the cows come home and nothing will happen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top