|
Post by jarychk on Jun 29, 2024 18:11:24 GMT
I wanted to find how to remove contents from a textbox control, tried searching as best I could through the JB helpfile, thought I found the helpful information, but it did not work. I tried varying ways of 'cls' and nothing was working; but I found what to do, really very simple. Simply print the empty string to it!
This small sample program could be helpful to someone or someones.
__
'how to clear a textbox control
nomainwin
WindowWidth = 568 WindowHeight = 295
UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
textbox #main.textbox1, 38, 101, 192, 45 button #main.button2, "REMOVE FROM T.B.", [button2Click], UL, 302, 101, 200, 35 open "ERASE TEXTBOX CONTENTS" for window as #main print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 10" PRINT #main.textbox1, "ERASE ME!"
wait
[quit.main] Close #main END
[button2Click] print #main.textbox1,"" wait
__
|
|
|
Post by tsh73 on Jun 30, 2024 9:27:52 GMT
Good find. But really, it *is* in a helpfile. On Textbox page:
|
|