Hi, i've two questions !
1) The following example show you my problem. If you use directly the cursor key to drawing into the canvas, it works, no problem. Now, if you write something into the textfield or use the button you can't drawing into the canvas !!!
2) how to perform 'SetGadgetText TextField2, TextFieldText(TextField1)' only if you enter some text into
TextField1 and press the enter key (without press the button).
Many thanks for your help !
1) The following example show you my problem. If you use directly the cursor key to drawing into the canvas, it works, no problem. Now, if you write something into the textfield or use the button you can't drawing into the canvas !!!
2) how to perform 'SetGadgetText TextField2, TextFieldText(TextField1)' only if you enter some text into
TextField1 and press the enter key (without press the button).
Many thanks for your help !
Win1 = CreateWindow("Window1",81,133,250,280,Desktop(),3) Canvas1 = CreateCanvas(12,13,200,120,Win1,0) TextField1 = CreateTextField(11,142,100,20,Win1,0) SetGadgetText TextField1,"Blitz+" TextField2 = CreateTextField(12,170,100,20,Win1,0) SetGadgetText TextField2,"Nothing" Button1 = CreateButton("Button",15,198,100,20,Win1,0) SetBuffer CanvasBuffer (Canvas1) Color 255,255,255 x = 100 : y=100 Rect x,y,2,2 FlipCanvas (Canvas1) While WaitEvent()<>$803 Select EventSource() Case button1 SetGadgetText TextField2, TextFieldText(TextField1) End Select If KeyDown(200) Then y = y - 1 If KeyDown(208) Then y = y + 1 If KeyDown(203) Then x = x - 1 If KeyDown(205) Then x = x + 1 SetBuffer CanvasBuffer (Canvas1) Color 255,255,255 Rect x,y,2,2 FlipCanvas (Canvas1) Wend