Announcement

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

    Hover defaultWidth

    Hey,

    I'm trying to work with "tooltips", and i see that there is a defaultWidth for Hover component (100).

    As i can see, even if the text should take more than 100px, it will always wrap.

    I want to set the maxWidth (400) for all Hovers' but no matter what i do in the "load_skin.js", the Hover components always have width 100.

    How can i change the code, so the Hover will be in the width of the text, but will not exceed 400?

    Thanks.

    SmartClient version : v8.3p_2013-01-21/PwerEdition Development Only

    #2
    You can control the hover width via Canvas.setHoverWidth(), or at the system level via Hover.hoverCanvasDefaults [usually implemented in the Skin file].

    This will allow you to set the default width to 400.

    It sounds like you're also looking for something a little different - having the hover canvas size to exactly fit the text if it requires less than 400px, and once the text expands horizontally to accomodate that the canvas stops expanding and the text starts wrapping.

    This is not something we currently support. There may be a way to achieve this - for example by embedding custom HTML within your hover prompt which will expand in this way, and having the hover itself just be overflow:"visible" so it expands as wide as that custom HTML - but we don't have a solution in place to get the behavior you describe.

    Regards
    Isomorphic Software

    Comment

    Working...
    X