DynaPDF.Table.SetGridWidth
--------------------------

Sets the grid width.

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

MBS( "DynaPDF.Table.SetGridWidth"; Table; Horz; Vert ) 

**MBS**( **"DynaPDF.Table.SetGridWidth";** /\* Sets the grid width. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Horz**; /\* Horizontal grid width or zero.e.g. 0 \*/   
**$Vert**) /\* Vertical grid width or zero.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Table | The identifier for the table. | $Table |
| Horz | Horizontal grid width or zero. | 0 |
| Vert | Vertical grid width or zero. | 0 |

### Result

Returns OK or error.

### Description

Sets the grid width.  
The table grid consists of horizontal and vertical lines which are drawn in the middle of two rows or columns. The grid lines cover always the entire width or height of the table. The line widths can be set to different values for the horizontal and vertical lines. If no lines should be drawn then set the value to zero. The colors of horizontal and vertical grid lines can be set with [DynaPDF.Table.SetRGBColor](DynaPDFTableSetRGBColor.md), [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md) or [DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md).  
Only the table supports grid lines. The parameters Row and Col of [DynaPDF.Table.SetRGBColor](DynaPDFTableSetRGBColor.md), [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md) or [DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md) must be set to -1.  
### Examples

Set grid width:

 MBS ("DynaPDF.Table.SetGridWidth"; $table ; 1; 1)  
Set blue grid lines:

 Set Variable \[ $r ; Value:MBS ("[DynaPDF.Table.SetRGBColor](DynaPDFTableSetRGBColor.md)"; $table ; -1; -1; "GridHorzColor"; 0; 0; 255) \]  
Set Variable \[ $r ; Value:MBS ("[DynaPDF.Table.SetRGBColor](DynaPDFTableSetRGBColor.md)"; $table ; -1; -1; "GridVertColor"; 0; 0; 255) \]  
Set Variable \[ $r ; Value:MBS ("DynaPDF.Table.SetGridWidth"; $table ; 1; 1) \]  
### See also

- [DynaPDF.Table.Create](DynaPDFTableCreate.md)
- [DynaPDF.Table.Draw](DynaPDFTableDraw.md)
- [DynaPDF.Table.GetTableWidth](DynaPDFTableGetTableWidth.md)
- [DynaPDF.Table.SetBorderWidth](DynaPDFTableSetBorderWidth.md)
- [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md)
- [DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md)
- [DynaPDF.Table.SetColWidth](DynaPDFTableSetColWidth.md)
- [DynaPDF.Table.SetRGBColor](DynaPDFTableSetRGBColor.md)
- [DynaPDF.Table.SetRowHeight](DynaPDFTableSetRowHeight.md)
- [DynaPDF.Table.SetTableWidth](DynaPDFTableSetTableWidth.md)

### Example Databases

- [DynaPDF/Book Creation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Book%20Creation.shtml#3ScriptAnchor_)
- [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/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#5ScriptAnchor_)
- [DynaPDF/Report](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Report.shtml#1ScriptAnchor_)
- [DynaPDF/Tables](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Tables.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 1st June 2021

  
[DynaPDF.Table.SetFontSize](DynaPDFTableSetFontSize.md) - [DynaPDF.Table.SetPDF](DynaPDFTableSetPDF.md)

[HTML Version](DynaPDFTableSetGridWidth.shtml)