How can I change the text inside the .net textbox?


Hello everyone

I have a .Net textbox that display “undefined” word when nothing is written inside.
I want to removed this word as soon as the textbox is selected (is clicked) and the textbox ready for typing, and if another part of the window (bottun, another textbox or etc.) is clicked and the desired textbox had been still empty, the word will be displayed again.

thank you for your help . . .


smth like this might work

try (destroydialog X ) catch ()
rollout X "" (

	dotnetcontrol txt "" text:"Undefined"

	on txt LostFocus sender args do 
		if txt.text == "" do txt.text = "Undefined"
	on txt GotFocus sender args do 
		if txt.text == "Undefined" do txt.text = ""

createDialog X pos:[100,100]