DynaPDF.Table.SetCellStyledText
-------------------------------

Inserts the specified styled text into the cell.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [11.1](newinversion111.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.Table.SetCellStyledText"; Table; Row; Col; HAlign; VAlign; StyledText { ; LeadingFactor } ) 

**MBS**( **"DynaPDF.Table.SetCellStyledText";** /\* Inserts the specified styled text into the cell. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Row**; /\* The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1.e.g. 0 \*/   
**$Col**; /\* The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1.e.g. 0 \*/   
**$HAlign**; /\* The horizontal alignment. Can be left, center or right.e.g. "center" \*/   
**$VAlign**; /\* The vertical alignment. Can be bottom, center or top.e.g. "center" \*/   
**$StyledText**; /\* The styled text for the cell.e.g. TextColor ( "Hello World" ; RGB ( 65535 ; 0 ; 0 ) ) ) \*/   
**$LeadingFactor**) /\* Optional; If you pass a value &gt; 0, the plugin will add \\LD\[\] commands to styled text to set leading relative to font size. This way you define the spacing beteween lines.e.g. 1.2 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Table | The identifier for the table. | $Table |  |
| Row | The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. | 0 |  |
| Col | The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. | 0 |  |
| HAlign | The horizontal alignment. Can be left, center or right. | "center" |  |
| VAlign | The vertical alignment. Can be bottom, center or top. | "center" |  |
| StyledText | The styled text for the cell. | TextColor ( "Hello World" ; RGB ( 65535 ; 0 ; 0 ) ) ) |  |
| LeadingFactor | If you pass a value &gt; 0, the plugin will add \\LD\[\] commands to styled text to set leading relative to font size. This way you define the spacing beteween lines. | 1.2 | Optional |

### Result

Returns OK or error.

### Description

Inserts the specified styled text into the cell.   
Converts styled text to DynaPDF formatting commands and add it to the cell.  
Convenience function to call [DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md) with styled text converted through [DynaPDF.ConvertStyledText](DynaPDFConvertStyledText.md) internally.  
### Examples

Put some red text in the cell:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.Table.SetCellStyledText"; $table ; $rowNum ; 0; "left"; "bottom"; TextColor ( "Hello World" ; RGB ( 65535 ; 0 ; 0 ) ) ) \]  
### See also

- [DynaPDF.ConvertStyledText](DynaPDFConvertStyledText.md)
- [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)
- [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)
- [DynaPDF.Table.SetCellImageEx](DynaPDFTableSetCellImageEx.md)
- [DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)

### Release notes

- **Version 11.1**
    - Added [DynaPDF.Table.SetCellStyledText](https://www.mbsplugins.eu/DynaPDFTableSetCellStyledText.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-16/MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-09/Neues_MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 11.1](https://www.mbsplugins.de/archive/2021-03-09/MBS_FileMaker_Plugin_111/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.1pr6](https://www.mbsplugins.de/archive/2021-02-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 23th February 2021 , last changed 23th February 2021

  
[DynaPDF.Table.SetCellSpacing](DynaPDFTableSetCellSpacing.md) - [DynaPDF.Table.SetCellTable](DynaPDFTableSetCellTable.md)

[HTML Version](DynaPDFTableSetCellStyledText.shtml)