Yazı Tipi Ayarlarını İstemci Tarafından Güncelleyin

Contents
[ ]

Aspose.Cells GridWeb artık yazı tipi ayarlarını istemci tarafından değiştirmeyi destekliyor. Bunun için API aşağıdaki işlevleri sağlar

  • updateCellFontStyle: Parametreler - normal/italik/kalın/italik&&kalın için r/i/b/ib
  • updateCellFontSize: Parametreler - yazı tipi adı, vb. ‘Sistem’
  • updateCellFontName: Parametreler - yazı tipi boyutu, vb. “12pt”
  • updateCellFontColor: Parametreler - yok/u/l/ul/ için hiçbiri/altı çizili/üstü çizili/altı çizili&&üstü çizili
  • updateCellFontLine: Params - #aa22ee gibi html rengi veya yeşil, kırmızı,…
  • updateCellBackGroundColor: Params - #aa22ee gibi html rengi veya yeşil, kırmızı,…

Aşağıdaki kod parçacığı, GridWeb’de istemci tarafından değişen yazı tipi ayarlarını gösterir.

Basit kod

// 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>