Mettre à jour les paramètres de police du côté client
Contents
[
Hide
]
Cette rubrique traite de la modification des paramètres de police côté client dans le contrôle Aspose.Cells.GridWeb.
Aspose.Cells GridWeb prend désormais en charge la modification des paramètres de police du côté client. Pour cela, le API propose les fonctions suivantes
- mettre à jourCellFontStyle: Params - r/i/b/ib pour regular/italic/bold/italic&&bold
- mettre à jourCellFontSize: Params - nom de la police, etc. ‘Système’
- updateCellFontName: Paramètres - taille de la police, etc. ‘12pt’
- updateCellFontColor: Params - none/u/l/ul/ for none/underline/strikout/underline&&strikout
- updateCellFontLine: Params - couleur html comme #aa22ee ou nom de couleur bien connu comme vert, rouge,…
- updateCellBackGroundColor: Params - couleur html comme #aa22ee ou nom de couleur bien connu comme vert, rouge,…
L’extrait de code suivant illustre la modification des paramètres de police du côté client dans GridWeb.
Exemple de code
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> |