Announcement

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

    FormItem Hint

    Hi,

    I was wondering why the FormItem hint feature was implemented in a way that
    when focus is gained inside the actual field, the hint goes away ...

    If you look at most other frameworks, their hint feature is implemented so that
    the hint remains visible when the field gets input focus. The hint goes away only
    when/if the user starts typing inside the field ...

    Anyway that alternate behaviour could be achieved in SmartClient ?

    There are many drawbacks to the current behaviour which I'm sure you're aware of ...

    Thanks,

    #2
    It seems that both are common, and there are drawbacks to each - one is the possibility that the user starts selecting the hint text, or that autofill tools believe there is already a value in the field. It may also interfere with IMEs.

    Comment


      #3
      Ok. I guess this can be arguable. You're right, there are pros and cons to both approaches ...

      We believe the user will want that hint information once they are in the field, just before
      keying their input data, not when they are positioned on the previous field ...

      There's also an issue with the first field of a form (that has a hint associated) and for which
      that form automatically sets the focus on that field. The user will never get to see the hint ...

      So back to the initial question ... Would there be a way to get that other approach ?

      Thanks,

      Comment


        #4
        You would add a formatEditorValue() that translates null or "" to the hint text, and a parseEditorValue() that translates the field value back to null or "" if it exactly matches the hint text.

        You also probably want to add a changed() handler that switches the textBoxStyle between greyed text (when the hint is showing) vs normal text.

        Comment


          #5
          Will give that a try. Thanks!

          Comment

          Working...
          X