ListDialog.SetColumnAlignment
-----------------------------

Sets the column alignment.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ListDialog](component_ListDialog.md) | [11.2](newinversion112.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "ListDialog.SetColumnAlignment"; Index; Alignment ) 

**MBS**( **"ListDialog.SetColumnAlignment";** /\* Sets the column alignment. \*/  
**$Index**; /\* The index of the column starting with zero for the first one.e.g. 0 \*/   
**$Alignment**) /\* The new alignment to use.  
0 = default from OS  
1 = left  
2 = center  
3 = righte.g. 3 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Index | The index of the column starting with zero for the first one. | 0 |
| Alignment | The new alignment to use.   0 = default from OS   1 = left   2 = center   3 = right | 3 |

### Result

Returns OK or error.

### Description

Sets the column alignment.  
Seems like Windows only allows left align for first column.  
And you may need to set widths on macOS if you use right/center alignment.  
### Examples

Sets column alignment to center for second column:

 Set Variable \[ $r ; Value: MBS ("ListDialog.SetColumnAlignment"; 1; 2) \]  
### See also

- [ListDialog.GetColumnAlignment](ListDialogGetColumnAlignment.md)
- [ListDialog.SetColumnCount](ListDialogSetColumnCount.md)

### Release notes

- **Version 11.2**
    - Added [ListDialog.SetColumnAlignment](https://www.mbsplugins.eu/ListDialogSetColumnAlignment.shtml) and [ListDialog.GetColumnAlignment](https://www.mbsplugins.eu/ListDialogGetColumnAlignment.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 11.2](https://www.mbsplugins.de/archive/2021-05-26/New_in_MBS_FileMaker_Plugin_11/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.2pr6](https://www.mbsplugins.de/archive/2021-05-04/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 3th May 2021 , last changed 3th May 2021

  
[ListDialog.SetCloseDialogOnDoubleClick](ListDialogSetCloseDialogOnDoubleClick.md) - [ListDialog.SetColumnCount](ListDialogSetColumnCount.md)

[HTML Version](ListDialogSetColumnAlignment.shtml)