Enum GlyphType
GlyphType
列舉支援的字形類型。
如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如
DocumentApp.GlyphType.BULLET
。
使用 GlyphType
列舉,設定清單項目的項目符號類型。
const body =
DocumentApp.getActiveDocument().getActiveTab().asDocumentTab().getBody();
// Insert at list item, with the default nesting level of zero.
body.appendListItem('Item 1');
// Append a second list item, with a nesting level of one, indented one inch.
// The two items have different bullet glyphs.
body.appendListItem('Item 2')
.setNestingLevel(1)
.setIndentStart(72)
.setGlyphType(DocumentApp.GlyphType.SQUARE_BULLET);
屬性
屬性 | 類型 | 說明 |
BULLET | Enum | 預設的圓形實心項目符號。 |
HOLLOW_BULLET | Enum | 空心子彈。 |
SQUARE_BULLET | Enum | 方形項目符號。 |
NUMBER | Enum | 以數字為基礎的項目符號。 |
LATIN_UPPER | Enum | 拉丁大寫的圓點。 |
LATIN_LOWER | Enum | 拉丁小寫圓點。 |
ROMAN_UPPER | Enum | 羅馬數字,大寫圓點。 |
ROMAN_LOWER | Enum | 羅馬數字,小寫的圓點。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-22 (世界標準時間)。
[null,null,["上次更新時間:2024-12-22 (世界標準時間)。"],[[["`GlyphType` is an enumeration used to specify the type of bullet or symbol used in list items within Google Docs."],["You can use the `GlyphType` enumeration with the `setGlyphType()` method to change the bullet style of list items."],["Several predefined glyph types are available, including `BULLET`, `HOLLOW_BULLET`, `SQUARE_BULLET`, `NUMBER`, `LATIN_UPPER`, `LATIN_LOWER`, `ROMAN_UPPER`, and `ROMAN_LOWER`."],["To call a specific glyph type, use the syntax `DocumentApp.GlyphType.[GlyphTypeName]`, for example, `DocumentApp.GlyphType.BULLET` for a standard bullet."]]],[]]