Announcement

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

    How to set hover to show the contents of a FormItem

    I have a FormItem that has a value that is sometimes to large to be readable by the user. The FormItem is by default disabled. I want to be able to hover over the FormItem and have the Hover display the complete value of the item.

    So here is what I have:

    TextItem item = new TextItem(''subscriber:, "Subacriber Name");
    item.disable();

    DynamicForm form = new DynamicForm();
    form.setHeight("70px");
    form.setCanHover(Boolean.TRUE);
    form.setShowHover(Boolean.TRUE);

    form.setNumCols(2);
    form.setFields( item );

    Now when the item gets a value, item.setValue("Billy Bod Blass Jr. PhD KBE, KCBE");
    and the value is longer than the width of the item,
    I expect that the user hovering over the item would show the full value in the hover.

    How can I accomplish this?

    #2
    Disabled items are non-interactive, so that won't. Instead, set the item canEdit:false to make it read-only but not disabled, then consider either readOnlyDisplay:"readOnly" or readOnlyDisplay:"static" with clipStaticValue:true

    Comment


      #3
      Ok, now I see and it works.

      If the data value in the item exceeds its width, the hover to show the entire value works fine.

      However, if the item width is wide enough to show the entire data value in the item (value is not cut off), the hover does not work.

      This behavior is different from a listgrid. I have canHover set to true on a list grid and all of the cells will show their values in the hover regardless of whether the value is cut-off or not.

      Why is this?

      Comment


        #4
        The ListGrid also defaults to hovering only when clipped, but if you set canHover to true, there is always a hover, clipped or not.

        Comment


          #5
          Ah, now I see. Thanks so much for this information.

          Comment

          Working...
          X