Notifications
Clear all
[Closed] How can I change the text inside the .net textbox?
Aug 03, 2022 9:55 pm
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 . . .
1 Reply
Aug 03, 2022 9:55 pm
smth like this might work
try (destroydialog X ) catch ()
rollout X "" (
dotnetcontrol txt "system.windows.forms.textbox" 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]