implementing strikethrough in datawidget
pag ni-type yung styleset.font.strikethrough, hindi automatic na nalabas sa intellisense yung mga properties(underline, italic, strikethrough, etc) nung font nung styleset ng infragistic grid. para mapalabas yung mga properties nung font nung infragistic styleset, i-assign sa Font object yung .Font nung styleset. then pwedeng sa Font variable na i-set yung mga font's property like underline, italic, strikethrough, bold, etc
------------
Option Explicit
Private Sub Form_Load()
Dim s As StyleSet
grd.StyleSets.Add "Failed"
Set s = grd.StyleSets("Failed")
'Dim f As Font
'Set f = s.Font
s.Font.Strikethrough = True ' line 7
s.Font.Name = "Comic Sans MS"
' mas better, itong sa baba, automatic nalabas yung intellisense, i-uncomment lang yung Dim f and Set f sa taas, then comment the line 7, uncomment line 8
'f.Strikethrough = True ' line 8
End Sub
Private Sub grd_RowLoaded(ByVal Bookmark As Variant)
If grd.Columns("Grade").CellValue(Bookmark) > 3 Then
grd.Columns("Subject").CellStyleSet "Failed"
Else
grd.Columns("Subject").CellStyleSet ""
End If
End Sub
0 Comments:
Post a Comment
<< Home