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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keypress, Keydown Problem

Status
Not open for further replies.

darinmc

Technical User
Feb 27, 2005
171
GB
Hi
What i would like to do is, when I type in a text box (tDescrip), I would like the label (lblDescrip) to change instantly with each keypress.

Is this possible and could you help with the code please?

Thx
Darin
 
Yes this is possible, what are you wanting to change the label to?
 
with each key pressed, i want the lDescrip.caption to be equal the tDescrip

As i type in . . .

I want the same thing to show in the label
Thx
Darin
 
Just put this in the KeyUp event of the textbox
lDescrip.caption = tDescrip.text
 
The Change event might be better as it will detect any change in addition to keystrokes (e.g. pasting something in from the clipboard).

 
I agree, using the Change event and tDescrip.text is the best way to go here, but I just have to ask the burning question"Why?"

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top