• Not Answered

Deltav Live - Clear Value of Text Entry Element

I'm trying to find away to reset the displayed value of a Text Entry Elements Displayed value when I click a button for clearing all Text Entry Elements on a form.

When troubleshooting in Dev Tools I can do this by writing to the Value as shown.
Dsp.TextEntry1.Value = ""

But in graphic studio I get a reference error when I have this config so will fail my qualification tests.

When I use the syntax 

Dsp.TextEntry1.InitialValue = ""

The button works first time when clicked, but if value is re-entered and clear is clicked again the displayed Text Entry value remains.

Can someone shed light on what is the best practice for clearing/resetting a Text Entry elements displayed value?

Is there any functions within the Text Entry Object that allows me to do this?

6 Replies

  • The Text Entry object seems to have issues accepting any values the display author tries to write to it. I haven't been able to solve this issue myself, but one thing that did help was adding the line "TextEntry1.FocusAndSelect();" to its OnHasFocus function. This means that while the value sticks around, an operator clicking into the field automatically selects all the text within TextEntry1 and can hit Backspace or Delete to instantly clear it out.
  • Try (Dsp.TextEntry1 as any).Value = ""
  • In reply to Matt Stoner:

    Thanks a million Matt, your syntax did the job.
    Much appreciated, as this seemed so basic but had me at my wits end.
    Also thanks Andrew for the info Regarding .FocusAndSelect()
  • In reply to Frank Kelly:

    No Problem, just be aware that this only clears the syntax checking and doesn't mean it will work for all cases...but in this case it does Smiley

    Users should check debug method like you did to ensure it is valid before using this.

  • In reply to Frank Kelly:

    does this have anything to do with a Text object being a MultiLanguage string, rather than a String?

    Andre Dicaire

  • In reply to Andre Dicaire:

    I don't think so as in some other cases I can use "string text" or a string Standard and the "parsing" doesn't care for the script. It's like the parser doesn't know that .Value is a part of the Text Entry object. Now "animating" a Multi-Language item will force it to use a Multi-Language type.