Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to Clear empty display value on TextItem on click

    I'm using TextItem.setEmptyDisplayValue() and was wondering how to clear the empty display value when a user clicks or focuses on the item like how Google calendar does it (see attached image).
    Attached Files

    #2
    Have you tried using a hint with showHintInField=true?

    Comment


      #3
      Awesome, it worked. Thanks!

      Comment


        #4
        Actually now that I got the functionality working, I'm trying to style the hint in the text box but it's not working with setHintStyle. Any ideas?

        Comment


          #5
          The setHintStyle does not apply to an in-field hint. You have to change the styling by modifying the textItemHint style because it also provides the L&F for the text box.

          Comment


            #6
            Thanks for the hint! After poking around with the dev console, I found out that calling setTextBoxStyle("style") and setting "style" and "styleHint" in my css file worked.

            Comment


              #7
              Also, "styleFocused" is another style that will work when the cursor is in the text item.

              Comment

              Working...
              X