セルのフォントを太字にするには?
対象製品
MultiRow for Windows Forms 10.0J
詳細
実行時に、現在のセルのフォントを太字に設定するにはCell.InheritedStyle.Fontプロパティを参照してセルに適用されているフォントを参照し、Cell.Style.Fontプロパティに変更したいフォントを適用します。条件付きセルスタイルや、行のセルスタイルを使用している場合それぞれのStyle.Fontプロパティを設定します。
[Visual Basic]
[C#]
[Visual Basic]
Imports GrapeCity.Win.MultiRow Dim currentCell As Cell = GcMultiRow1.CurrentCell Dim currentFont As Font = currentCell.InheritedStyle.Font Dim boldFont As Font = New Font(currentFont, FontStyle.Bold) currentCell.Style.Font = boldFont
[C#]
using GrapeCity.Win.MultiRow; Cell currentCell = gcMultiRow1.CurrentCell; Font currentFont = currentCell.InheritedStyle.Font; Font boldFont = new Font(currentFont, FontStyle.Bold); currentCell.Style.Font = boldFont;