Enum TabType

TabType

การแจกแจงแท็บทุกประเภท

หากต้องการเรียก enum คุณจะต้องเรียกคลาส ชื่อ และพร็อพเพอร์ตี้ระดับบนสุด เช่น DocumentApp.TabType.TAB

ใช้การแจงนับ TabType เพื่อตรวจสอบประเภทขององค์ประกอบที่ระบุ เช่น

var tab = DocumentApp.getActiveDocument().getTab('t.0');
// 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_TABEnumประเภทที่สอดคล้องกับ DocumentTab