操作模式不正确使得spread列中不能显示按钮

来源:互联网 发布:知乎推广策略 编辑:程序博客网 时间:2024/05/01 07:27

今天在spread列中显示按钮,结果怎么也不显示,找了很久的原因,终于发现,问题出在OperationMode 属性上。

如果OperationMode 设为OperationModeRow,则所有表格中的列全部不显示,只有改成OperationModeNormal才会显示成按钮。

与按钮有关的属性主要有两个要注意:
    .OperationMode = OperationModeNormal
    .ButtonDrawMode = ButtonDrawModeCurrentRow
以及 .Lock=False,否则按钮不能按下。

 

''范例
With Spd
    .OperationMode 
= OperationModeNormal
    .ButtonDrawMode 
= ButtonDrawModeCurrentRow

    .row
=0
    .Col 
= i + 1: i = i+1
    .Text 
= "查看"

    .Row 
= -1
    .CellType 
= CellTypeButton
    .TypeButtonType 
= TypeButtonTypeNormal
    .TypeButtonText 
= "查看"
    .Lock 
= False
End With

原创粉丝点击