Enum HorizontalSizeStyle
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แนวนอนขนาดสไตล์
อาร์เรย์แบบจำกัดที่กำหนดวิธีจัดวางวิดเจ็ตให้เต็มพื้นที่ของคอลัมน์
พร้อมใช้งานสำหรับแอป Google Chat และส่วนเสริมของ Google Workspace
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.HorizontalSizeStyle.FILL_AVAILABLE_SPACE
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
FILL_AVAILABLE_SPACE | Enum | ปรับขนาด Widget ให้เต็มพื้นที่แนวนอนที่มีอยู่ของ Column หากคอลัมน์อื่นมีพื้นที่ว่างมากกว่า วิดเจ็ตจะเติมพื้นที่เกินพื้นที่ของคอลัมน์ของตัวเองได้
ค่าเริ่มต้น |
FILL_MINIMUM_SPACE | Enum | ปรับขนาด Widget ให้เต็มพื้นที่แนวนอนน้อยที่สุดใน Column
พื้นที่ขั้นต่ำจะขึ้นอยู่กับขนาดของวิดเจ็ต หากวิดเจ็ตมีขนาดเล็กกว่าพื้นที่ของคอลัมน์ วิดเจ็ตจะไม่ขยายเพื่อเติมเต็มพื้นที่ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eHorizontalSizeStyle is an enum used to define how widgets occupy space within a column in Google Chat apps and Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two properties: \u003ccode\u003eFILL_AVAILABLE_SPACE\u003c/code\u003e (default) which expands the widget to fill the available horizontal space, potentially exceeding its column's width, and \u003ccode\u003eFILL_MINIMUM_SPACE\u003c/code\u003e which sizes the widget to its minimum required width based on its content.\u003c/p\u003e\n"],["\u003cp\u003eTo use these properties, call them using the parent class, name, and property, like \u003ccode\u003eCardService.HorizontalSizeStyle.FILL_AVAILABLE_SPACE\u003c/code\u003e.\u003c/p\u003e\n"]]],["`HorizontalSizeStyle` is an enum controlling widget sizing within a column in Google Chat apps and Workspace add-ons. It has two properties: `FILL_AVAILABLE_SPACE`, which is the default and allows a widget to occupy all horizontal space, even extending beyond its column if another has more space, and `FILL_MINIMUM_SPACE`, where the widget uses only the minimum space it requires and will not expand to fill the column.\n"],null,["# Enum HorizontalSizeStyle\n\nHorizontalSizeStyle\n\nAn enum that sets how widgets fill the space of a column.\n\nAvailable for Google Chat apps and Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.HorizontalSizeStyle.FILL_AVAILABLE_SPACE`. \n\n### Properties\n\n| Property | Type | Description |\n|------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `FILL_AVAILABLE_SPACE` | `Enum` | Sizes the [Widget](/apps-script/reference/card-service/widget) to fill the available horizontal space of a [Column](/apps-script/reference/card-service/column). If the other column has more space, the widget can fill the space beyond the space of its own column. Default. |\n| `FILL_MINIMUM_SPACE` | `Enum` | Resizes the [Widget](/apps-script/reference/card-service/widget) to fill the least amount of horizontal space in a [Column](/apps-script/reference/card-service/column). The minimum space is based on the size of the widget. If the widget is smaller than the space of the column, it doesn't expand to fill the space. |"]]