Announcement

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

    Custom component hover - interaction & how to define hover height

    Hi Isomorphic,

    I'm using latest 5.1p (v10.1p_2016-09-14) and custom component hovers like in this sample.

    It seems that interaction with the hovers is not possible (e.g. having a ListGrid as hover component and resorting or filtering it), as the hover disappears, once you move the mouse from the hovered cell to the hover.
    This is fine for me, as I'm going to display-only related information to the hovered cell/record.

    But as the data I'm going to display is 1:n, I don't know beforehand how many rows the ListGrid will contain.
    If I make the hover not tall enough, I'll have scrollbars I can't use - I don't want that.
    If I make the hover too high (educated guess about max rows), I'll have white space in the most cases - I don't want that, either.

    Is there a simple way to solve this?
    Code:
                lg.setHeight(50);
                lg.setWidth(50);
                lg.setOverflow(Overflow.VISIBLE);
    which should work according to the Overflow.VISIBLE docs does not work (no resize, still scrollbars).
    Originally posted by Overflow.VISIBLE docs
    Content that extends beyond the widget's width or height is displayed. Note: To have the content be sized only by the drawn size of the content set the overflow to be Canvas.VISIBLE and specify a small size, allowing the size to expand to the size required by the content. Leaving the width / height for the widget undefined will use the default value of 100, and setting the size to zero may cause the widget not to draw.
    I'll try manual height calculation in a DataArrived-handler next, but this does not feel correct.

    Best regards
    Blama

    #2
    Since the grid is being used as a hover, it's having base hover properties applied to it - the set of hover-related attributes of Canvases generally - hoverHeight is one of them, others include hoverWrap/Width/Align/VAlign/Style and Opacity.. So you can set those on either your grid or a field, and they'll be incorporated.

    autoFitData:"vertical" and autoFitMaxRecords might be something you could consider also.

    Comment


      #3
      Hi Isomorphic,

      Code:
      lg.setAutoFitData(Autofit.VERTICAL);
      does the trick. Amazing as always.

      Thanks for the fast answer
      Blama

      Comment

      Working...
      X