I’m trying to clear a text input widget from my sketch as soon as the value is sent. I’ve tried this but it doesn’t have any effect:
BLYNK_WRITE(V4) {
Blynk.virtualWrite(V4, "");
}
Is there a way to do this? Thanks!
I’m trying to clear a text input widget from my sketch as soon as the value is sent. I’ve tried this but it doesn’t have any effect:
BLYNK_WRITE(V4) {
Blynk.virtualWrite(V4, "");
}
Is there a way to do this? Thanks!
Have you tried…
Blynk.virtualWrite(V4, " ");
(with a space between the quotes)?
If that doesn’t work then what app version and OS are you using?
Pete.
That does work, Pete. Sort of … What I’d really like is a way to clear the field, not replace with a space. The space is preventing the hint from reappearing, and it’s adding a space to the front of my strings (unless I remember to hit the “delete” key, of course). Not very pretty. I was hoping there was a way to really null out the field. A nice feature for the input widgets (that I think would be widely used) would be a “clear on send” option. But since that’s not there, I was hoping there was a way to do it from the sketch.
What about an escape backspace delete
character…
Blynk.virtualWrite(V4, "\b");
Pete.
Nope. But worth a try! Thanks anyway, Pete.
Hi,
to my knowledge this problem is not resolved
This is quite annoying, because the space will be left after a user input, without any server-side strategy to guess whether it should be deleted or not.
adding a method (“clear”, “clean”, …) to get a clean empty input would be more than necessary, don’t you think ?
True, Any method to clear text input field and see that hint again…
Pete, do we have anything to clear the input already?
No.
Pete.