Enum SelectionType
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
SelectionType
ประเภทของ Selection
SelectionType
แสดงถึงประเภทที่เฉพาะเจาะจงที่สุดของออบเจ็กต์อย่างน้อย 1 รายการที่เลือก ตัวอย่างเช่น หากเลือกอินสแตนซ์ TableCell
อย่างน้อย 1 รายการใน Table
ประเภทการเลือกจะเป็น SelectionType.TABLE_CELL
คุณสามารถเรียกข้อมูล TableCellRange
โดยใช้ Selection.getTableCellRange
คุณสามารถเรียกข้อมูล Table
โดยใช้ Selection.getPageElementRange
และเรียกข้อมูล Page
ได้จาก Selection.getCurrentPage
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
SlidesApp.SelectionType.TEXT
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
UNSUPPORTED | Enum | ประเภทการเลือกที่ไม่รองรับ |
NONE | Enum | ไม่ได้เลือก |
TEXT | Enum | การเลือกข้อความ |
TABLE_CELL | Enum | การเลือกเซลล์ในตาราง |
PAGE | Enum | การเลือกหน้าในแถบแสดงตัวอย่างภาพ |
PAGE_ELEMENT | Enum | การเลือกองค์ประกอบของหน้า |
CURRENT_PAGE | Enum | การเลือกหน้าปัจจุบัน |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eSelectionType\u003c/code\u003e identifies the specific type of selected objects in Google Slides, like text, table cells, or pages.\u003c/p\u003e\n"],["\u003cp\u003eWhen multiple objects of the same type are selected, \u003ccode\u003eSelectionType\u003c/code\u003e reflects the most specific type, enabling access to properties like \u003ccode\u003eTableCellRange\u003c/code\u003e or \u003ccode\u003ePageElementRange\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSelectionType\u003c/code\u003e has several enum values, including \u003ccode\u003eUNSUPPORTED\u003c/code\u003e, \u003ccode\u003eNONE\u003c/code\u003e, \u003ccode\u003eTEXT\u003c/code\u003e, \u003ccode\u003eTABLE_CELL\u003c/code\u003e, \u003ccode\u003ePAGE\u003c/code\u003e, \u003ccode\u003ePAGE_ELEMENT\u003c/code\u003e, and \u003ccode\u003eCURRENT_PAGE\u003c/code\u003e, representing different selection states.\u003c/p\u003e\n"],["\u003cp\u003eYou can access these values using the syntax \u003ccode\u003eSlidesApp.SelectionType.TEXT\u003c/code\u003e (replace \u003ccode\u003eTEXT\u003c/code\u003e with the desired property).\u003c/p\u003e\n"]]],[],null,["# Enum SelectionType\n\nSelectionType\n\nType of [Selection](/apps-script/reference/slides/selection).\n\nThe [SelectionType](#) represents the most specific type of one or more objects that are\nselected. As an example if one or more [TableCell](/apps-script/reference/slides/table-cell) instances are selected in a [Table](/apps-script/reference/slides/table), the selection type is `Selection``Type.TABLE_CELL`. The [TableCellRange](/apps-script/reference/slides/table-cell-range) can be\nretrieved by using the `Selection.getTableCellRange`. The [Table](/apps-script/reference/slides/table) can be retrieved by\nusing the `Selection.getPageElementRange` and the [Page](/apps-script/reference/slides/page) can be retrieved from the\n`Selection.getCurrentPage`.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nSlidesApp.SelectionType.TEXT`. \n\n### Properties\n\n| Property | Type | Description |\n|----------------|--------|--------------------------------------------|\n| `UNSUPPORTED` | `Enum` | A selection type that is not supported. |\n| `NONE` | `Enum` | No selection. |\n| `TEXT` | `Enum` | Text selection. |\n| `TABLE_CELL` | `Enum` | Table cell selection. |\n| `PAGE` | `Enum` | Page selection in the thumbnail flimstrip. |\n| `PAGE_ELEMENT` | `Enum` | Page element selection. |\n| `CURRENT_PAGE` | `Enum` | Current page selection. |"]]