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() → FillReturns the fill.
setFill(fill: Fill)ตั้งค่าค่าการเติม.
getBorder() → BorderReturns the border.
setBorder(border: Border)ตั้งค่าค่าเส้นขอบ.
getAlignment() → Alignmentส่งคืนการจัดแนว.
setAlignment(alignment: Alignment)ตั้งค่าค่าการจัดแนว.
setNumberFormat(format: string)ตั้งค่าค่ารูปแบบตัวเลข.
getNumberFormat() → `stringundefined`
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() → `stringundefined`
setFontColor(color: string)กำหนดค่าสีฟอนต์.
getForegroundColor() → `stringundefined`
setForegroundColor(color: string)ตั้งค่าค่าสีพื้นหน้า.
getBackgroundColor() → `stringundefined`
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 นี้.

ดูเพิ่มเติม

 ภาษาไทย