DynaPDF.Table.SetFlags
----------------------

The function sets various flags.

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

MBS( "DynaPDF.Table.SetFlags"; Table; Row; Col; Flags ) 

**MBS**( **"DynaPDF.Table.SetFlags";** /\* The function sets various flags. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Row**; /\* The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. Pass -1 for all rows.e.g. 0 \*/   
**$Col**; /\* The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. Pass -1 for all columns.e.g. 0 \*/   
**$Flags**) /\* The flags to set. Can be string identifier or the numerical values.e.g. "HeaderRow" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Table | The identifier for the table. | $Table |
| Row | The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. Pass -1 for all rows. | 0 |
| Col | The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. Pass -1 for all columns. | 0 |
| Flags | The flags to set. Can be string identifier or the numerical values. | "HeaderRow" |

### Result

Returns OK or error message.

### Description

The function sets various flags.   
Flags are inherited from the table, column, and rows, in this order.  
  
| Static | This flag avoids the deletion of cell contents when [DynaPDF.Table.ClearContent](DynaPDFTableClearContent.md), [DynaPDF.Table.ClearColumn](DynaPDFTableClearColumn.md) or [DynaPDF.Table.ClearRow](DynaPDFTableClearRow.md) is called. The flag can be set to rows, columns, and cells. |
|---|---|
| HeaderRow | Header rows are the first rows which are drawn after a page break occurred. It is possible to mark more than one row as header row. |
| NoLineBreak | This flag avoids line breaks in cells which contain text. The flag is inherited from the table, columns, and rows. Text is output with WriteText() if this flag is set. See [DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md) for further information. |
| ScaleToRect | If set, images and templates are scaled into the cell so that both sides fit into the given width and height. The aspect ratio will be preserved. The flag is inherited from the table, columns, and rows. |
| UseImageCS | If set, images are inserted in the native image color space and embedded ICC profiles will be considered. The flag is inherited from the table, columns, and rows. |

  
Added new flag FixedTextHeight for v11.5:   
If set, text does not increase the row height if necessary. The row height must be non-zero in this case.  
### Examples

Sets the HeaderRow flag for a row:

 MBS ("DynaPDF.Table.SetFlags"; $table ; $row ; -1; "HeaderRow")  
Adds a header row:

 #Add header row   
Set Variable \[$row ; Value:MBS ("[DynaPDF.Table.AddRow](DynaPDFTableAddRow.md)"; $table )\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 0; "right"; "top"; "Index")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 1; "left"; "top"; "Product")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 2; "right"; "top"; "Price")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 3; "right"; "top"; "Quantity")\]  
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)"; $table ; $row ; 4; "right"; "top"; "Total Price")\]  
\# set flag for header row   
Set Variable \[$r ; Value:MBS ("DynaPDF.Table.SetFlags"; $table ; $row ; -1; "HeaderRow")\]  
\# make row bold   
Set Variable \[$r ; Value:MBS ("[DynaPDF.Table.SetFont](DynaPDFTableSetFont.md)"; $table ; $row ; -1; "Helvetica"; 2; 1; "unicode")\]  
No line breaks in first column:

 MBS ("DynaPDF.Table.SetFlags"; $table ; -1; 0; "NoLineBreak")  
### See also

- [DynaPDF.Table.AddRow](DynaPDFTableAddRow.md)
- [DynaPDF.Table.ClearColumn](DynaPDFTableClearColumn.md)
- [DynaPDF.Table.ClearContent](DynaPDFTableClearContent.md)
- [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)
- [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)
- [DynaPDF.Table.SetCellImage](DynaPDFTableSetCellImage.md)
- [DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md)
- [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md)
- [DynaPDF.Table.SetFont](DynaPDFTableSetFont.md)
- [DynaPDF.Table.SetPDF](DynaPDFTableSetPDF.md)

### Release notes

- **Version 11.5**
    - Added FixedTextHeight flag for [DynaPDF.Table.SetFlags](https://www.mbsplugins.eu/DynaPDFTableSetFlags.shtml) function.

### Example Databases

- [DynaPDF/Catalog with tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Catalog%20with%20tables.shtml#1ScriptAnchor_)
- [DynaPDF/Invoice/Invoice](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Invoice/Invoice.shtml#3ScriptAnchor_)
- [DynaPDF/Tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Tables.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 11.5pr3](https://www.mbsplugins.de/archive/2021-10-25/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 24th October 2021

  
[DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md) - [DynaPDF.Table.SetFont](DynaPDFTableSetFont.md)

[HTML Version](DynaPDFTableSetFlags.shtml)