---
title: "SetMenuColumnHeader | open.mp"
description: "Sets the caption of a column in a menu."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/SetMenuColumnHeader
language: th
---

# SetMenuColumnHeader

## คำอธิบาย

Sets the caption of a column in a menu.

| Name | Description |
| --- | --- |
| menuid | ID of the menu to change. |
| column | The column (0 or 1) to set the header of. |
| text\[\] | The caption text for the column. |

## ส่งคืน

This function does not return any specific values.

## ตัวอย่าง

```c
new Menu:TestMenu;

// There are two rows in this menu
TestMenu = CreateMenu("Menu Header", 2, 200.0, 100.0, 150.0, 150.0);
SetMenuColumnHeader(TestMenu, 0, "Row 1");
SetMenuColumnHeader(TestMenu, 1, "Row 2");

// Add menu items to it.
AddMenuItem(TestMenu, 0, "Row1 Item1");
AddMenuItem(TestMenu, 1, "Row2 Item1");
```

## บันทึก

warning

-   Crashes when passed an invalid menu ID. (Fixed in open.mp)
-   Note that you can add only 12 items with AddMenuItem. The 13th object of a menu would replace the header of the column which is correctly set with this function.

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   [AddMenuItem](https://omp.itsneufox.com/th/docs/scripting/functions/AddMenuItem): Add an item to a menu.
-   [CreateMenu](https://omp.itsneufox.com/th/docs/scripting/functions/CreateMenu): Create a menu.
-   [OnPlayerSelectedMenuRow](https://omp.itsneufox.com/th/docs/scripting/callbacks/OnPlayerSelectedMenuRow): Called when a player selected a row in a menu.
