how to use label with textbox...  
Author Message
avols143





PostPosted: Visual FoxPro General, how to use label with textbox... Top

Hello friends...

I am new to visual foxpro. I have been learned programming in Foxpro 2.6 for Dos.. Now I want to learn visual foxpro..

I had make just a simple form with one textbox, one label control and one command button. I just want to do after running this form that I typed in textbox control it should be appear in label control by hitting Enter key after giving any data in textbox Or by clicking command button..

What codes I have to write...

Need your help...thanks a lot



Visual FoxPro1  
 
 
Misiacik7





PostPosted: Visual FoxPro General, how to use label with textbox... Top

I am not an expert but this is simple

Fisrt way is with the commandbutton.

We have one label, one textbox, one commandbutton.

in the command button in click method type this code in:

Thisform.label1.caption=thisform.text1.value

Easy isn't it

The second way without command button is not that easy

In the textbox in the keypress type this code in:

if nkeycode=13

thisform.label1.caption=thisform.text1.value

endif

Third way to do it is without the commandbutton and without typing ENTER

in the textbox in interactivechange type this code in:

thisform.label1.caption=thisform.text1.value