注册 登录
编程论坛 VB6论坛

MSHFlexgrid控件如何设置显示内容在格子中间

chen3bing 发布于 2020-04-14 10:00, 1553 次点击
只有本站会员才能查看附件,请 登录

如题,我显示的不在中间。谢谢
2 回复
#2
chen3bing2020-04-14 10:35
With MSHFlexGrid1
    .Row = 0
   
   
        For i = 0 To .Cols - 1
           
            .Col = i
             .CellAlignment = flexAlignCenterCenter
        Next
   
    .Row = 49
End With
我这样写,不管用。
#3
ZHRXJR2020-04-16 21:54
.CellAlignment = flexAlignCenterCenter   好像不能用在循环里例如这样“”
With MSHFlexGrid1
    .Cols = 2
    .Rows = 2
    .TextMatrix(0, 0) = "XH"
    .TextMatrix(0, 1) = "SJ"
    .TextMatrix(1, 0) = 1
    .TextMatrix(1, 1) = 123 * 6
    .CellAlignment = flexAlignCenterCenter   '使第二列,第二行在单元格的中部居中
End With
只有本站会员才能查看附件,请 登录
1