Styling Table Fields

The Style command in the context menu on column headers allows us to set the display style for a field.   We can change the display style for a field by right-clicking the column head for the field and choosing Style.  That launches the Style dialog, allowing us to choose different ways of displaying text as URLs, different ways of displaying dates and times, or different styles for latitude and longitude numbers, such as decimal degrees or degrees, minutes, and decimal seconds, all with automatic adaptation to different language and country styles for displaying numeric values and dates.   


Choosing a style can provide useful information at a glance, such as the styles for Tile fields in images which provide at a glance the size of tiles and the number and data type of channels used.  Styles for geometry fields in drawings can at a glance show the size of the geom, either in bytes or the number of coordinates.


Styles can also provide special functionality.  For example, styling text fields using URL style enables Manifold to automatically launch programs and browsers from fields in tables.  Right-click on a cell and choose Open URL to launch that URL.  For example, suppose we have a drawing that shows the locations of famous chateaux in France, and the drawing's table has a URL field for each chateau that gives the website for that chateau that has been styled using the URL style for text fields in tables.   We can Alt-click the point for a chateau in a drawing to open that chateau's record in the Info pane, and then right-click onto the URL and choose Open URL to launch the URL for the chateau's web site in our Internet browser.


URLs can also be used to launch programs to open files, using URL formats such as file:///c:/... to specify the file to be opened.  URLs for files will be opened by whatever is the default program for opening that type of file, such as, a PDF reader or browser to open .pdf files.  


When fields are styled in a table, other components such as the Values tab in the Info pane, or  Labels,  that take their data from those fields will automatically inherit the style specified for that field in the table.


 Styling a field does not change either the field's data type or the contents of that field.  It just changes the way the contents of the field are displayed in a table window, the Info pane, Labels, or other settings where the table values are displayed.    For example, styling a datetime field that contains the value 05/19/2016 07:27:37 to use the D (date) option so it displays as Thursday, 19 May 2016  does not convert the datetime field into a text field so that the day of the week and the month can be spelled out, nor does it truncate the datetime value to remove the time portion.   It simply shows the datetime value using a different display format.

Style Dialog

Right-clicking a column head for a field and choosing Style will launch the Style dialog for that field.


Styling options for fields of the various data types will appear in the Style dialog based on the data type of the field, with each row in the dialog's list being a style option.  The first column in the Style dialog list is a more-or-less mnemonic letter code, usually a single character or two characters, with the second column in the Style dialog providing a preview of how typical values in the field will appear using that style option.  


The mnemonic letters used to identify each style option are the same as the style codes used as arguments for the underlying StringFormat... SQL function used to generate the displayed style from field values.   That provides a handy way to see what the SQL functions do as well as providing a guide for what style codes to use when programmatically duplicating a field style used in a table.



Click a style option to pick it and then press OK to apply that style option.  Entering a number in the Digits box, choosing an N, E, S, W hemisphere in the Positive degrees box, or choosing a language will automatically update the previews shown in the Style list to incorporate the specified options.



A list of prebuilt styles.   The list of styles available will depend on the data type of the field being styled.


The Choice tab allows entry of list of choice values that are integers, and how those choice values should be displayed.   Editing fields that have a choice style will pop open a drop down list of allowed choices.


See the Styling Choices in Tables topic for information on the Choice tab.

(left column)

A more-or-less mnemonic letter code for the style.  For example, c is a mnemonic for currency.  The letters are the same that can be used as arguments to specify that style when working with the StringFormat... SQL function for that field's data type

(right column)

A preview of what the style will display, using example values of the field's data type.   The preview will automatically be updated given any options specified in the Digits box, the Positive degrees box, or picked for a language.


Enter a number specifying the number of digits after a decimal point, for those formats that have decimal digits.

Positive degrees

Used with numeric fields that represent longitudes and latitudes when positive and negative values are to be displayed using a hemisphere letter for North, East, South, and West.  Pick (none), N, E, S, or W (or the lower case equivalents) to specify which hemisphere letter should be used for positive values.  The opposite hemisphere letter will automatically be used for negative values.   Choose E for longitude values to use the accepted convention that positive longitude values are East longitudes and negative longitude values are West longitudes.    Choose N for latitude values to use the accepted convention that positive latitude values are North latitudes and negative latitude values are South latitudes.


Choose a language-country pair, specifying a language as used in a particular country.  Choosing a language will automatically translate datetime styles that use day of the week and month names into that language's words for days of the week and months.   Numeric and other fields will automatically utilize that country's style for formats, including that country's currency symbol, as well the characters used for list separators, digit group separators in numbers, and decimal point separator.

Language-country picker button.  Launch the Language dialog.


Apply the specified style and exit the dialog.


Exit the dialog without making any changes.

Language Dialog

Clicking the language picker button launches the Language dialog.   Choosing a language-country combination chooses that language's names for days of the week names and month names for datetime formats that uses days of the week and months, and it chooses currency and numeric style for that country, such as the character used as a digit group separator in numbers and decimal point character for formats that use decimal positions.


The list of language-country combinations will depend on the version of Windows in use.  Windows 10 and 11 provide over 600 choices, while earlier versions of Windows supported by Manifold provide over 300 choices.    All of the commonly used language-country combinations appear both in earlier versions of Windows as well as in Windows 10 and 11, so we are on safe ground choosing one of the usual several dozen choices of languages most often used in international settings.   


However, if we choose one of the extended set of languages found in Windows 10 but not in, say, Windows 7, for a particular style, such as a datetime, and we save the project, if we open that project in Windows 7 the field will be formatted as blank content.   Therefore, when using Windows 10 and 11 languages we should plan on sharing projects using those languages only with users who are working with Windows 10 or 11.


The Language dialog lists all Windows 10/11 languages.  If we are running some older version Windows, language choices that are not supported by that version of Windows will show the language-country code in the left column but the right column naming the language and country will be blank.  That warns us that the particular Windows version in use will not display that language.



Click a language to pick it and then press OK to choose it.

Language Dialog Controls

Filter box: Enter text to be matched, case not significant.   The list of language-country codes will be reduced to show only those which match the text.    For example, entering german will reduce the list to codes which include words such as Germany and German in their description.  Entering -US will reduce the list to codes that have -US in their names or descriptions, showing all of the languages associated with the United States.  Entering de- will reduce the list to German language codes as spoken in various countries, as well as the kde-TZ code, for Makonde language as spoken in Tanzania.

(left column)

Windows language-country code.  The language code is an ISO code for a specific language, with the country code being an ISO code for a specific country.  The result is a code that specifies a given language as spoken in a given country.  Examples are de-CH for German language as spoken in Switzerland and de-DE for German language as spoken in Germany.

(right column)

The name of the language with country in parentheses.


Choose the picked language and close the dialog.


Close the dialog without making any changes.


Numeric Example

We can change the display style of a numeric field to show currency.



For example, we can right-click on the Unit Price column header and choose Style.



The Style dialog shows previews of what different styles will look like using the data type of the field.  Numbers can be used to represent many different things, such as latitudes and longitudes, scientific values, currency, and more, so there are many different styles in the list.


We can then choose a currency style.  



The Style dialog launched from the context menu allows us to choose a Language, which is (neutral) by default.   Choosing the neutral default or a US language like en-US results in use of a dollar sign at the beginning of the value and US style numbers, using a dot . character for the decimal separator.

Choosing a Language

We can change the language and country settings by right-clicking the Unit Price column header again, and choosing Style.



 Pick a language by clicking the language picker button, and then choosing More.  



The Language dialog shows over 600 language-country codes.    That can make it difficult to find a particular language and country combination, so in most cases we will use the filter box to narrow down the choices to something manageable.



For example, entering Germany in the filter box will reduce the list to only those entries that have Germany in them.   That picks out all of the language options used in Germany.   We can click the de-DE choice to choose German language as used in Germany.


Press OK to apply the choice.



The Style dialog will now show options as used in German language in Germany.   


Press OK to apply to the table.



Choosing a different language, such as by entering de-DE for German, in the Language box in the Style dialog will cause the currency style to use settings for that language and country, for example, using a euro sign at the end of the value and German style numbers, using a comma , character for the decimal separator.



Styles are available for most data types, such as datetime values.



For example, we can choose a style that shows the day of the week and the name of months.  Using (neutral) or en-US in the Language box of the Style dialog will result in US style English words.



Using a different language, such as de-DE for German, in the Language box of the Style dialog will result in automatically translated names for the days of the week and months.

Editing / Filtering Styled Fields

There are two cases when styles are not applied in table windows, even if we have used the Style context menu command to set the style for a given field:




Favorite Languages and Field Styles

When choosing a style for fields, we have a Language option that allows us to pick from over 600 language-country combinations.  We can save time when picking frequently used languages by making them favorites.


Right-clicking on a column header and choosing Style calls up the Style dialog.   



 We can make a favorite of a language-country option that we have picked in the Language option, such as de-DE for German language in Germany, by clicking the language picker button and choosing Favorites.




Ctrl-click the language choice in the lower pane to select it.



Press the Add to Favorites button to add it to the Favorites list in the upper pane.



Press OK to update the Favorites list.



Now, whenever we click the language picker button, we will see our choice in the Favorites list, enabling us to assign it with a single click.

Language Codes

Language codes that are used in the Style dialog, are standard language codes as used in many settings in Windows, such as de-DE for German language as used in Germany, or en-US for English as used in the US.  A table giving 655 language codes, including broad variations as haw-US for Hawaiian language as used in the United States, can be downloaded in the Release 9 project from the Manifold website.

Reference Guides to Field Styles

Display options shown in the Style command depend on the data type of the field:



In addition to styles for the above data types, the Style command also provides a Choice option to display values from a set of choices to match an integer token found in a numeric field.


The Style pane provides so many capabilities for styling table fields that several topics are required.   For detailed information organized by the data type of the field, including examples, see the following topics:


Style: Binary, Boolean, UUID Fields


Style: Datetime Fields


Style: Geom, Tile Fields


Style: Numeric Fields


Style: Text Fields


Styling Choices in Tables




How to copy a formatted value?  There are two ways to copy a formatted value:


A simple approach is to select the record, and then right-click the column head for the desired cell and choose Copy.  That will copy the formatted text to the clipboard as a text string.


A more complex approach is to create a filed that has formatted, string versions of the value.  That is because simply right-clicking onto a cell and choosing Copy copies the true value in the cell.


Suppose we have styled a datetime field so that values like  05/19/2016 07:27:37 will display as Thursday, 19 May 2016.   If we right-click onto that cell and choose Copy, what is pasted into some other setting will be 05/19/2016 07:27:37 and not Thursday, 19 May 2016.   That is because we copy the true value that is in the cell, which is a datetime value and not a text string that includes words for the day of the week and the name of the month.    If we want to copy the styled version of the date, we should create a new text field and then fill it with formatted, string versions of the datetime values, using an expression in the Transform pane such as:


StringFormatDateTime([Datetime], 'D', '')


That will create text values in the cells for that field, so when we copy the contents of the cell we copy a text string for what is seen in the cell, and not a datetime value.

See Also



Editing Tables


Data Types


Styling Choices in Tables


Info Pane