How to print text to a Text Field..?
BlitzPlus Forums/BlitzPlus Programming/How to print text to a Text Field..?
| ||
| Hey, I know how to use the text, you write yourself in a Text Field. But how do you throw some text into a Text Field? Fx picture this.. You have a window with two Text Fields, and one button. You type some random text into the first field. Then, when the button is pressed, the entered text will appear in the second Text Field. How is this done? |
| ||
uhm... like this? :)
app=CreateWindow("hello gadgettext!",0,0,320,240)
txt1=CreateTextField(32,32,80,32,app)
txt2=CreateTextField(32,80,80,32,app)
butt=CreateButton("copy",32,144,32,32,app)
Repeat
WaitEvent()
If EventSource()=app
If EventID()=$803 Exit
EndIf
If EventSource()=butt
If EventID()=$401
SetGadgetText txt2,TextFieldText(txt1)
EndIf
EndIf
Forever
End
|
| ||
| SetGadgetText.. JESUS CHRIST!!!! Okay, learning.. :) Thanks a lot! ;) |
| ||
| Learn all of those Gadget commands by heart, and remember, EVERYTHING is gadget. Even Windows. ;-) |