Announcement

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

    Cell Alignment/Formatting

    Regarding your showcase example: Format Values (Custom Formatting)

    http://www.smartclient.com/smartgwt/..._format_values

    PROBLEM STATEMENT:

    How would one format the field Area (km2) to have alignment right with an offset so that the numbers are more towards the center?

    Note that the problem solution would also address aligning currencies in a column.

    SUGGESTIONS:

    I can think of two ways to achieve this:

    1) Add a parameter that specifies an offset in either: pixels; spaces; or percent width of field. BTW, why does the title not line up to the right?

    2) Center align cell and format numbers with leading blanks so that each area value has a string of fixed width. Perhaps a more general NumberFormat that pads with leading and trailing options of "spaces" or 0's.
Working...
X