Non vi pare un po' strano il comportamento della proprietà Font nelle celle di una GridView di questo esempio ? :-X
Public Sub Form_Open()
With GridView1
.Columns.Count = 2
.Rows.Count = 2
.Columns. W = GridView1.W * 0.5
End With
' 1° caso:
With GridView1[0, 0]
.Font.Size = 20
.Font.Bold = True
.Text = "Alibaba"
End With
' 2° caso:
With GridView1[0, 1]
.RichText = "<B>"
.Font.Size = 20
.Font.Bold = True
.Text = "Alibaba"
End With
End
Ho ricevuto la risposta da Minisini al riguardo, il quale così dice:
« Not really: The Font property returns a copy of the font object, so by
writing: GridView[...].Font.Bold = True, you modify the copy.
You must write:
hFont = GridView[...].Font
hFont.Bold = True
GridView[...].Font = hFont
Only the control class has a trick that allows "hControl.Font.Bold =True" to work!
Regards,
--
Benoît Minisini »