非常需要高手:VB的MSHFlexGrid列表问题

2025-03-13 01:05:46
推荐回答(4个)
回答1:

该控件不同于.net中的Grid控件。不过可以其它控件给MSHFlexGrid赋值,如Combox,textbox,使用方法是EnterCell事件里把Combox的坐标与该单元格对应大小。
Private Sub MSHFlexGrid1_EnterCell()
With MSHFlexGrid1
If .TextMatrix(.Row, .Col) <> "" Then
If .Col = 4 Then
combType.Move .CellLeft + .Left - 10, .CellTop + .Top - 10, .CellWidth
combType.Visible = True
End If
If .Col > 4 And .Col < 9 Then
combOther.Move .CellLeft + .Left - 10, .CellTop + .Top - 10, .CellWidth
combOther.Visible = True
End If
If .Col < 4 Then
combOther.Visible = False
combType.Visible = False
End If
End If
End With
End Sub

回答2:

MSHFlexGrid不支持编辑修改功能,只能用一个TextBox的Move方法移动到想编辑的位置,然后根据MSHFlexGrid.row的相关条件保存TextBox的内容。

回答3:

晕!!这个问题刚刚回完你又来了,汗~

http://zhidao.baidu.com/question/75070684.html

回答4:

你直接创建一个microsoft excel对象不就行了。。?