Posted 1 November 2018, 10:06 pm EST
Hi,
I am using VB.Net and ComponentOne 2017.2.1.5.
I am having trouble setting the text size in the grid using styles.
The following does work:
fontname = "Arial"
fontsize = 50
Dim csc As CellStyle = Me.fa.Styles.Add("Style")
csc.Font = New Font(fontname , fontsize , FontStyle.Bold)
Dim crhc As CellRange = Me.fa.GetCellRange(1, 1, Me.fa.Rows.Count - 1, Me.fa.Cols.Count - 1)
crhc.Style = csc
The following does NOT works:
(the fontsize values come from Microsoft SQL Server. This field is an integer.)
fontname = "Arial"
fontsize = ds.Tables("fontsizeTable").Rows(index).Item("fontsize")
Dim csc As CellStyle = Me.fa.Styles.Add("Style")
csc.Font = New Font(fontname , fontsize , FontStyle.Bold)
Dim crhc As CellRange = Me.fa.GetCellRange(1, 1, Me.fa.Rows.Count - 1, Me.fa.Cols.Count - 1)
crhc.Style = csc
Regardless of the fontsize value, the size is always the default grid size.
Am i missing something?
Any help is greatly appreciated.
Thanks