Beautify MSHFLEXGRID, vellaway set color universal functions

zhaozj2021-02-16  59

'Set the color of each row of mshflexgrid

Public Sub SetRowColor (Byref MshflexGrid As Object)

DIM J, I, OBJNAME

ObjName = TypeName (MSHFLEXGRID)

IF strconv (Trim (objName), vBuppercase <> "mshflexgrid" then

EXIT SUB

END IF

Mshflexgrid.fillstyle = 1

For i = 1 to mshflexgrid.rows - 1

Mshflexgrid.row = i

IF i mod 2 = 0 THEN

Mshflexgrid.col = 0

Mshflexgrid.colsel = mshflexgrid.cols - 1

Mshflexgrid.cellbackColor = & H80FFF

END IF

Next I

Mshflexgrid.fillstyle = 0

Mshflexgrid.row = 0

Mshflexgrid.col = 0

End Sub

转载请注明原文地址:https://www.9cbs.com/read-22245.html

New Post(0)