if we disable any text box in the form it display grey text in it. is it possible to display text dark black even it is enable = false???
how it is possible to do this???
thanx in advance
firoz
Printable View
if we disable any text box in the form it display grey text in it. is it possible to display text dark black even it is enable = false???
how it is possible to do this???
thanx in advance
firoz
Try putting the text box in a frame and diabling the frame.
try changing the backgroung colour of the text box once disabled!!
not sure if it will work but have a go!!
another way could be doing it from the windows settings in Control pannel!
you could use the locked property of the textbox control which disables the textbox from being edited but does not greyout the text.
eg. txtName.Locked = true.
this can be done in Code or in the properties of the TextBox control.
thanku for ur replay.
we can do the same by putting readonly property of the text box true. but by this trick tab stop of the text box will be there.
the background of the textbox remain the same(white) but the text color ofthe textbox change to the grey.
please try if it is possible by subclassing the text box???
thanx once again!!
firoz
:)
I tested it and this works for me. Add a frame to the form, put the textbox in the frame and a command button, then add this code. Click the command button to enable/disable the textbox.
Code:Private Sub Command1_Click()
Me.Frame1.Enabled = Not (Me.Frame1.Enabled)
End Sub
Private Sub Form_Load()
Me.Frame1.BorderStyle = 0
End Sub
thanku all gays for ur help. thanku very much all of u.
using frame for all textbox may require lot of programming in the form. speacially when u have lot of text boxes in the form.
firoz,
Not really, you are just disabling the frame instead of the actual textbox, so it should take exactly the same code. At design time set the border style of the frame to none. At run time you just need 1 line:Quote:
using frame for all textbox may require lot of programming in the form. speacially when u have lot of text boxes in the form.
Me.Frame1.Enabled = true/false
Also it sounds like you are using a text box to display read only data, in which case I would use a label instead of a textbox :).
ROLLING ON FLOOR LAUGHING MY ASS OFF!!!!!!Quote:
Originally posted by firoz
thanku all gays for ur help. thanku very much all of u.
ok, n/m :D :rolleyes: :D
he he
now thats go to be tghe quote of the day!!
:D :D :D :D
typing mistack!!!!:D
thanku very much Nucleus for ur help. u got the right think. i want to display matters in the text box only. if user click on edit button then the all related textbox should able to accept the input.
thanku once again. it working adjact i want.
I missed it first time around :p, classic.