Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Enum TabType
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TabType
การแจงนับประเภทแท็บทั้งหมด
หากต้องการเรียกใช้ enum ให้เรียกใช้คลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum เช่น
DocumentApp.TabType.TAB
ใช้การแจงนับ TabType เพื่อตรวจสอบประเภทขององค์ประกอบที่กำหนด เช่น
const tab = DocumentApp.getActiveDocument().getActiveTab();
// Use getType() to determine the tab's type before casting.
if (tab.getType() === DocumentApp.TabType.DOCUMENT_TAB) {
// It's a document tab, write some text to it.
tab.asDocumentTab().setText('Hello World!');
} else {
// There are currently no types other than DOCUMENT_TAB.
}
พร็อพเพอร์ตี้
| พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
DOCUMENT_TAB | Enum | ประเภทที่สอดคล้องกับ DocumentTab |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2026-04-13 UTC
[null,null,["อัปเดตล่าสุด 2026-04-13 UTC"],[],["The `TabType` enumeration defines the types of tabs within a document. It currently has one property: `DOCUMENT_TAB`, which represents a DocumentTab. To use `TabType`, access it via `DocumentApp.TabType.DOCUMENT_TAB`. The `getType()` method can determine a tab's type, and you should use it for type checking before casting it as a Document Tab with `asDocumentTab()`.\n"]]