Style
ภาพรวม
Style เป็น class ใน Aspose.Cells FOSS สำหรับ TypeScript. สืบทอดจาก: StyleType.
คลาสนี้ประกาศ 37 methods สำหรับอ็อบเจ็กต์ Style ในโปรแกรม TypeScript. วิธีการ ที่มีรวม: constructor, getAlignment, getBackgroundColor, getBorder, getFill, getFont, getFontColor, getFontName, getFontSize, getForegroundColor, getHorizontalAlignment, getNumberFormat, และ 25 methods เพิ่มเติม. สมาชิกสาธารณะสามารถเข้าถึงได้จากแอปพลิเคชัน TypeScript ใด ๆ หลังจากติดตั้งแพคเกจ Aspose.Cells FOSS สำหรับ TypeScript. คุณสมบัติ: alignment, border, fill, font, numberFormat, protection.
คุณสมบัติ
| ชื่อ | ประเภท | การเข้าถึง | คำอธิบาย |
|---|---|---|---|
font | : Font | อ่าน/เขียน | รับหรือกำหนดแบบอักษร. |
fill | : Fill | อ่าน/เขียน | รับหรือกำหนดการเติม. |
border | : Border | อ่าน/เขียน | รับหรือกำหนดค่า border. |
alignment | : Alignment | อ่าน/เขียน | รับหรือกำหนดการจัดแนว. |
numberFormat | : string | อ่าน/เขียน | รับหรือกำหนดรูปแบบตัวเลข. |
protection | : Protection | อ่าน/เขียน | รับหรือกำหนดค่าการป้องกัน. |
วิธีการ
| ลายเซ็น | คำอธิบาย |
|---|---|
constructor() | เรียกคอนสตรัคเตอร์บนอินสแตนซ์ Style นี้. |
getFont() → Font | คืนฟอนต์. |
setFont(font: Font) | กำหนดค่าแบบอักษร. |
getFill() → Fill | Returns the fill. |
setFill(fill: Fill) | ตั้งค่าค่าการเติม. |
getBorder() → Border | Returns the border. |
setBorder(border: Border) | ตั้งค่าค่าเส้นขอบ. |
getAlignment() → Alignment | ส่งคืนการจัดแนว. |
setAlignment(alignment: Alignment) | ตั้งค่าค่าการจัดแนว. |
setNumberFormat(format: string) | ตั้งค่าค่ารูปแบบตัวเลข. |
getNumberFormat() → `string | undefined` |
setProtection(protection: Protection) | กำหนดค่าการป้องกัน. |
isBold() → boolean | ส่งคืนค่า true หากตั้งค่าเป็นตัวหนา. |
setBold(bold: boolean) | ตั้งค่าค่าตัวหนา. |
isItalic() → boolean | คืนค่า true หากตั้งค่า italic. |
setItalic(italic: boolean) | ตั้งค่าค่าตัวเอียง. |
getFontName() → string | คืนค่า font name. |
setFontName(name: string) | ตั้งค่าชื่อแบบอักษร. |
getFontSize() → number | ส่งคืนขนาดฟอนต์. |
setFontSize(size: number) | ตั้งค่าขนาดฟอนต์. |
getFontColor() → `string | undefined` |
setFontColor(color: string) | กำหนดค่าสีฟอนต์. |
getForegroundColor() → `string | undefined` |
setForegroundColor(color: string) | ตั้งค่าค่าสีพื้นหน้า. |
getBackgroundColor() → `string | undefined` |
setBackgroundColor(color: string) | ตั้งค่าค่าสีพื้นหลัง. |
getHorizontalAlignment() → string | คืนค่าการจัดแนวนอน. |
setHorizontalAlignment(alignment: Alignment["horizontal"]) | กำหนดค่าการจัดแนวนอน. |
getVerticalAlignment() → string | คืนค่าการจัดแนวตั้ง. |
setVerticalAlignment(alignment: Alignment["vertical"]) | กำหนดค่าการจัดตำแหน่งแนวตั้ง. |
isWrapText() → boolean | คืนค่า true หากตั้งค่า wrap text. |
setWrapText(wrapText: boolean) | ตั้งค่าค่าการห่อข้อความ. |
isLocked() → boolean | คืนค่า true หากตั้งค่า locked. |
setLocked(locked: boolean) | ตั้งค่าค่าที่ล็อกไว้. |
isHidden() → boolean | คืนค่า true หากตั้งค่า hidden. |
setHidden(hidden: boolean) | กำหนดค่าที่ซ่อนอยู่. |
toXml() → string | เรียก toXml บนอินสแตนซ์ Style นี้. |