Class BorderStyle
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สไตล์เส้นขอบ
คลาสที่แสดงสไตล์เส้นขอบที่สมบูรณ์ซึ่งนําไปใช้กับวิดเจ็ตได้
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.BorderStyle.NO_BORDER
เอกสารประกอบโดยละเอียด
setCornerRadius(radius)
กำหนดรัศมีมุมของเส้นขอบ เช่น 8
พารามิเตอร์
ชื่อ | ประเภท | คำอธิบาย |
radius | Integer | รัศมีมุมที่จะใช้กับเส้นขอบ |
รีเทิร์น
BorderStyle
— ออบเจ็กต์นี้สําหรับการต่อเชื่อม
setStrokeColor(color)
ตั้งค่าสีของเส้นขอบ
พารามิเตอร์
ชื่อ | ประเภท | คำอธิบาย |
color | String | สีในรูปแบบ #RGB ที่จะนําไปใช้กับเส้นขอบ |
รีเทิร์น
BorderStyle
— ออบเจ็กต์นี้สําหรับการต่อเชื่อม
setType(type)
ตั้งค่าประเภทของเส้นขอบ
พารามิเตอร์
รีเทิร์น
BorderStyle
— ออบเจ็กต์นี้สําหรับการต่อเชื่อม
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eBorderStyle\u003c/code\u003e objects define the style of borders applied to widgets, including corner radius, color, and type.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize border styles using methods like \u003ccode\u003esetCornerRadius()\u003c/code\u003e, \u003ccode\u003esetStrokeColor()\u003c/code\u003e, and \u003ccode\u003esetType()\u003c/code\u003e, which allow you to specify the desired attributes.\u003c/p\u003e\n"],["\u003cp\u003eEach customization method returns the \u003ccode\u003eBorderStyle\u003c/code\u003e object, enabling chained method calls for efficient styling.\u003c/p\u003e\n"],["\u003cp\u003eBorder attributes such as corner radius and stroke color are specified using integers and RGB color strings respectively, providing flexibility in design.\u003c/p\u003e\n"],["\u003cp\u003eBorder types are selected from the \u003ccode\u003eBorderType\u003c/code\u003e enum, which offers predefined border styles for easy implementation.\u003c/p\u003e\n"]]],[],null,["# Class BorderStyle\n\nBorderStyle\n\nA class that represents a complete border style that can be applied to widgets.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.BorderStyle.NO_BORDER`. \n\n### Methods\n\n| Method | Return type | Brief description |\n|------------------------------------------------------|------------------|------------------------------------------------------|\n| [setCornerRadius(radius)](#setCornerRadius(Integer)) | [BorderStyle](#) | Sets the corner radius of the border, for example 8. |\n| [setStrokeColor(color)](#setStrokeColor(String)) | [BorderStyle](#) | Sets the color of the border. |\n| [setType(type)](#setType(BorderType)) | [BorderStyle](#) | Sets the type of the border. |\n\nDetailed documentation\n----------------------\n\n### `set``Corner``Radius(radius)`\n\nSets the corner radius of the border, for example 8.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|-----------|------------------------------------------------|\n| `radius` | `Integer` | The corner radius to be applied to the border. |\n\n#### Return\n\n\n[BorderStyle](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Stroke``Color(color)`\n\nSets the color of the border.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------|----------|-------------------------------------------------------|\n| `color` | `String` | The color in #RGB format to be applied to the border. |\n\n#### Return\n\n\n[BorderStyle](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Type(type)`\n\nSets the type of the border.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|---------------------------------------------------------------|------------------|\n| `type` | [BorderType](/apps-script/reference/card-service/border-type) | The border type. |\n\n#### Return\n\n\n[BorderStyle](#) --- This object, for chaining."]]