Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenGround | gINT | Keynetix
  • Product Communities
OpenGround | gINT | Keynetix
OpenGround Wiki Text Styling
    • Sign In
    • -OpenGround Wiki
      • -Applications
        • +Admin Portal
        • +Civil 3D Extension
        • +Data Collector
        • +Data Entry Module
        • +Excel Extension
        • +Launcher
        • +OpenGround Professional
        • +Portal Technical Preview
        • +Power BI Connector
        • -Template Studio
          • Template Studio Release Notes
          • +Template Studio How Tos
          • +Template Studio FAQ's
          • +Template Studio Common Issues
          • -Template Studio User Guide
            • +Working with Templates
            • +The Interface
            • Important Template Settings Information
            • +Using Template Studio
            • +Template Setup
            • +Column Configuration
            • +Depth Related Items
            • +Designing Header and Footer Areas
            • +Designing Tables
            • +Filter Groups
            • +Types of Template
            • -Powerful Expressions
              • +Expression Library
              • Adding Text to Fields
              • Building Your Own Expressions
              • Changing Display Decimal Places
              • Combining Columns
              • -Different Types of Expressions
                • Excel Functions
                • Log Only Functions
                • Run Time Functions
                • Text Styling
                • Mathematical Functions
              • General Rules for Expressions
              • Nesting Functions
              • Referencing Columns in a Grid
        • +Upload Portal
        • +Web API and Task Service
        • +Web Portal
      • +Guides and Learning
      • OpenGround Supported Platforms
      • +How To Contact Support
      • Component Center
      • Events
      • Training Guides
      • +Developer Resources

     
     Questions about this article, topic, or product? Click here. 

    Text Styling

    Template Studio allows for text to be styled within an expression. This allows for more than one style to be applied to one item (separating parts of the text) and also allows finer control then is available from within the ribbon interface. This function is the textStyle function.

    The format for this is as follows:

    textStyle('My Text','Font Weight','Font Style','Font Colour')

    e.g;textStyle('My Text','900','Italic','FF0000')

    The parts of this function work as follows:

    My Text - This is the text that is to be displayed on the log, this can be either plain text or can be any function that is compatible with Template Studio.

    Font Weight - This is how heavy the text appears, on a scale 1 to 999, where 300 is Normal and 700 is Bold.

    Font Style - This is the style of the text; Normal/Italic/Oblique.

    Font Colour - This is the colour of the text in hexidecimal format (This includes transparency). Patterns supported are either RGB or ARGB formats such as FF0000 - red 00FF00 - green, 0000FF - blue and 880000FF is half transparent blue. An explanation of how this works can be found on Wikipedia here and a colour chart, useful for finding codes can be seen below.

    Note - All arguments are required. For example, if you just want to bold text but not change the style or color, the expression would be:

    textStyle('My Text','700','Normal','000000')

    Examples can be seen below:

    textStyle(ConcatenateWith('-',[SampleInformation.Type],[SampleInformation.SampleReference]),'900','Italic','FF0000')Would combine the sample type and reference in bold, italic, red text.

    textStyle('Client: ','100','Oblique','0000FF')+textStyle([Project.ClientName],'900','Italic','FF0000')

    Would show the text 'Client:' in blue oblique text and then the client name in bold, red, italic text.

    • Share
    • History
    • More
    • Cancel
    • Stephen Evason Created by Bentley Colleague Stephen Evason
    • When: Tue, May 31 2022 8:17 AM
    • Stephen Evason Last revision by Bentley Colleague Stephen Evason
    • When: Fri, Mar 3 2023 11:18 AM
    • Revisions: 3
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies