Announcement

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

    FormItem long title cut and show as hover

    Hi,

    Form title orientation is Top.
    In a certain use case, the user can create his own form, so he knows which fields he added. In that case, I would like not to wrap titles and if the title is longer than the editor width, cut the title with "...".
    With addTitleHoverHandler, I can then show the full title when hovering over.

    I thought the "cutoff title to ..." was already an existing feature. Is it, or am I looking in the wrong place? If it doesn't exist, is this easy to achieve?


    I'm lucky that I generate those items as a 1-item-per-form next to each other. So I set the Overflow HIDDEN on the form, which already gives the appearance of text cutting off. Though it would be prettier to cut the title a bit shorter to have room for 3 dots.
    But in normal forms, I can't use this approach.


    thanks

    #2
    IE supports a CSS setting "text-overflow:ellipsis". There are hacks that sort-of work on other browsers which we basically don't recommend (you can Google for details). There's no reasonably performant way to simulate IE's native feature here from JavaScript.

    Comment

    Working...
    X