Cell'in Yazı Tipini ve Rengini Değiştirme
Contents
[
Hide
]
Bu konuda, bir hücrenin yazı tipini ve yazı tipi rengini değiştirme hakkında konuşacağız. Bu özellik, geliştiricilere çalışma sayfalarının daha derinlemesine kontrolünü sağlar. Bu özelliği kullanarak, geliştiriciler istenen herhangi bir hücrenin yazı tipini ve rengini özelleştirebilir.
Cell’in Yazı Tipi ve Rengini Değiştirme
Aspose.Cells.GridDesktop kullanarak bir hücrenin yazı tipini ve rengini değiştirmek için lütfen aşağıdaki adımları izleyin:
- İstediğiniz herhangi birine erişinÇalışma kağıdı
- ErişimCell yazı tipi ve rengi değiştirilecek olan
- özelleştirilmiş oluşturunYazı tipi
- Yı kurYazı tipi arasındaCell özelleştirilmiş olana
- Son olarak ayarlaYazı rengi arasındaCell istenilen herhangiRenk
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 | |
// Accessing the worksheet of the Grid that is currently active | |
Worksheet sheet = gridDesktop1.GetActiveWorksheet(); | |
// Accessing a cell using its name | |
GridCell cell = sheet.Cells["A1"]; | |
// Creating a customized Font object | |
Font font = new Font("Arial", 10, FontStyle.Bold); | |
// Setting the font of the cell to the customized Font object | |
cell.SetFont(font); | |
// Setting the font color of the cell to Blue | |
cell.SetFontColor(Color.Blue); |
Yalnızca hücrenin yazı tipi veya yazı tipi rengi hakkında bilgi almanız gerekiyorsa, o zaman da kullanabilirsiniz.GetFont veGetFontColor hücre yöntemleri.