找回密码
 立即注册

QQ登录

只需一步,快速开始

CornsGrape

注册会员

10

主题

20

帖子

72

积分

注册会员

积分
72
CornsGrape
注册会员   /  发表于:2017-1-5 15:52  /   查看:3846  /  回复:3
在vb6.0中LeftCol是用来设置或返回到最左侧列的位置
在vb.net中对应的方法是SetViewportLeftColumn&GetViewportLeftColumn:
     Public Sub SetViewportLeftColumn(ByVal sheetIndex As Integer, ByVal columnViewportIndex As Integer, ByVal value As Integer)

     Parameters:
     sheetIndex: Index of sheet
     columnViewportIndex: Index of the viewport column
     value: Index of the column to set as the leftmost column of that viewport

第一个参数是sheet的序号,第二个是什么?第三个是要设定的值(如果其中有说的不对的,希望纠正!)



3 个回复

倒序浏览
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-1-5 16:23:53
沙发
第二个是viewport spread是可以分为好几个viewport的

blob423970336.png

Remarks
The sheet index is zero-based, so the first sheet has an index of 0.

The viewport column index is zero-based, so the first (leftmost) viewport column has an index of 0.
回复 使用道具 举报
CornsGrape
注册会员   /  发表于:2017-1-5 16:41:19
板凳
dexteryao 发表于 2017-1-5 16:23
第二个是viewport spread是可以分为好几个viewport的

    With fpSpread1
        Dim lintCol As Long
        .LeftCol = 2
        MsgBox .LeftCol
    End With
所以这个的msgbox弹出的值应该是2

对应到vb.net中
        With FpSpread1
            .SetViewportLeftColumn(0, 2)
            .GetViewportLeftColumn(1))
        End With
.SetViewportLeftColumn(0, 2) 相当于vb6.0中的.LeftCol=2吗?
回复 使用道具 举报
dexteryao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2017-1-5 17:41:57
地板
对的,但是你get的时候参数应该也是0

评分

参与人数 1满意度 +5 收起 理由
CornsGrape + 5

查看全部评分

回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部