hi friends I want to align my mshflexgrid to center;I tried
Private Sub Form_Load()
Dim i As Integer
For i = 1 To MSHFlexGrid1.Rows - 1
MSHFlexGrid1.CellAlignment = flexAlignCenterCenter
Next i
End Sub
but nothing happend ,what's wrong?
Printable View
hi friends I want to align my mshflexgrid to center;I tried
Private Sub Form_Load()
Dim i As Integer
For i = 1 To MSHFlexGrid1.Rows - 1
MSHFlexGrid1.CellAlignment = flexAlignCenterCenter
Next i
End Sub
but nothing happend ,what's wrong?
Cell based properties (such as CellAlignment) only affect the currently selected cell(s), as specified by .Row/.Col (and .RowSel/.Colsel).
If you want to change the alignment of cells in an entire column, use .ColAlignment
For a 'random' range of cells, specify .Row/.Col (and .RowSel/.Colsel) as apt, and use .CellAlignment.
thank u ,im gonna try what you said