Announcement

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

    Clipping Label

    Hi,

    I've got a Label, member of a HLayout. I would like the label to have a maximum width, with the value clipped if it gets wider than allowed.
    I've tried to set a hardcoded width to the layout and/or the label, the full value is always shown. Please note that I've set 'wrap' to false.

    Any advice would be greatly appreciated.

    Many thanks,

    Thomas
    PS: Using SGWT Power 4.1p

    #2
    We don't have a feature on Label specifically to allow a max width (although this is coming in 6.0). In current versions, what you can do is place the label inside an overflow:hidden container, such as a Canvas, and have that container have a fixed width which is that maximum size the label should have.

    Comment


      #3
      Thank you. If I do like this, will the setShowClippedTitleOnHover() feature work in that case? Not sure...

      Comment


        #4
        No. If that's a requirement, another possibility is to draw a Label with the same settings offscreen with autoFit:true, see how big it is, and size the Label that will be shown to the user accordingly.

        Comment

        Working...
        X