Announcement

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

    Two-column layout with overflow ellipsis

    I need to achieve something like this for a single line of text:

    Code:
    ------------------------------
    | Some text | fixed-teeeeext |
    ------------------------------
    
    -----------------------------------
    | Some long text | fixed-teeeeext |
    ------------------------------------
    
    -----------------------------------------
    | Some very long te... | fixed-teeeeext |
    -----------------------------------------
    |<-         a        ->|<-     b      ->|
    |<-                 c                 ->|
    (c) has a max width and (b) is fixed.

    It's possible to do this with an old-fashioned HTML table setting display: block on the (a) column but IE doesn't support that. It's also possible to do this with two divs and display:inline-block but IE only supports this in standard mode.

    How would I go about this with pure SmartGWT? I tried a number of things but the ellipsis are the problem (basis is an HLayout)...

    #2
    Originally posted by fhisg View Post
    It's possible to do this with an old-fashioned HTML table setting display: block on the (a) column but IE doesn't support that. It's also possible to do this with two divs and display:inline-block but IE only supports this in standard mode.
    Here's the SO reference I used: http://stackoverflow.com/q/12963561/131929
    "IE only [...] in standard mode" -> won't work if used with SmartGWT.

    Originally posted by fhisg View Post
    How would I go about this with pure SmartGWT? I tried a number of things but the ellipsis are the problem (basis is an HLayout)...
    I tried various combinations of the following:
    - HLayout with max width
    - "left" label with/without auto-fit and max width
    - "left" label with various overflow settings and once also with a custom style in my CSS file that does the text-overflow:ellipis, overflow:hidden, white-space:nowrap
    - "right" label with fixed width

    Comment


      #3
      After some more trial-and-error testing the essential question seems to be how to make SmartGWT print ellipsis /outside/ list grid cells (works nicely there)?

      Comment

      Working...
      X