Search code examples
smartgwt

SmartGWT turning off title wrapping makes row too wide


I have a VLayout with two DynamicForms in it . The titles of the first one are short enough to not get wrapped. The second one has longer titles, so I use it like setWrapItemTitles(false);

Turns out that the second form gets to be wider than the first one, even when there is a lot of extra space in the row, enough to fit the titles and keep the original width. This looks bad when having forms grouped.

Is there a way to avoid wrapping but not add so much extra space that is not used?


Solution

  • A workaround I found is to manually setting enough space for the title to make it fit will not cause the wrapping and will not add additional unused offset.

     setTitleWidth(150); //Or enough width
    

    However I would prefer a less "hardcoded" solution if available.