Uppdatera fonterinställningar från klientens sida
Contents
[
Hide
]
Detta ämne diskuterar ändring av fonterinställningar från klientens sida i Aspose.Cells.GridWeb-kontrollen.
Aspose.Cells GridWeb stöder nu att ändra typsnittsinställningar från klientens sida. För detta tillhandahåller API:en följande funktioner
- updateCellFontStyle: Parametrar - r/i/b/ib för vanlig/kursiv/fet/kursiv&&fet
- updateCellFontSize: Parametrar - fontnamn, etc. ‘System’
- updateCellFontName: Parametrar - fontstorlek, etc. ‘12pt’
- updateCellFontColor: Parametrar - none/u/l/ul/ för none/underline/strikout/understruken&&streckad
- updateCellFontLine: Parametrar - html-färg som #aa22ee eller välkända färgnamn som grönt, rött,…
- updateCellBackGroundColor: Parametrar - html-färg som #aa22ee eller välkända färgnamn som grönt, rött,…
Följande kodsnutt visar hur man ändrar typsnittsinställningar från klientens sida i GridWeb.
Exempelkod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
<script> | |
function makeFontItalic(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontStyle, "i"); | |
} | |
function makeFontBold(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontStyle, "b"); | |
} | |
function changeFontSize(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontSize, "5pt"); | |
} | |
function changeFontFamily(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontName, "Corbel Light"); | |
} | |
function changeFontColor(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontColor, "green"); | |
} | |
function changeFontBackgroundColor(){ | |
gridwebinstance.getByIndex(0).rangeupdate(updateCellBackGroundColor, "yellow"); | |
} | |
</script> |