Skip to content
Tako Lee edited this page Mar 2, 2024 · 12 revisions

Define the style that how to format a list of items such as select list, order by list, parameters and etc.

1. Type in Delphi

TAlignStyle = (asStacked,asWrapped);

2. Type in Java

public enum TAlignStyle {
	AsStacked, AsWrapped;
}

3. Uniform Type definition

  • Type name: TFmtListStyle
  • Available values:
  • value: 0, text: fit_into_one_line
  • value: 1, text: stacked
  • value: 2, text: fit_into_one_line_if_possible

Samples

  • Fit into one line

    All list items in the same line when length of total characters less than line with(80 characters), or start from the second line at the same column.

    SELECT Name, ProductNumber, ListPrice AS Price
    FROM Production.Product 
    ORDER BY Name ASC;
  • Stacked

    SELECT Name, 
           ProductNumber, 
           ListPrice AS Price
    FROM Production.Product

    When items were stacked and comma in list was put before items, then there are 2 options to align items.

    • First item align with next items
    SELECT Name
          ,ProductNumber
          ,ListPrice AS Price
    FROM Production.Product
    • First item align with comma
    SELECT Name
           ,ProductNumber
           ,ListPrice AS Price
    FROM Production.Product
Clone this wiki locally