界面上添加控件 mshflexgrid1 '属性不变 text1,combo1 'VISIBLE = FALSE代码如下: Private Sub Combo1_Click() Combo1.Visible = False End SubPrivate Sub MSHFlexGrid1_Click() With Me.MSHFlexGrid1 If .Col = 1 Then Text1.Appearance = 0 Text1.BorderStyle = 0 Text1.Visible = True Text1.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth, .CellHeight Text1.SetFocus End If
If .Col = 2 Or .Col = 3 Then Combo1.Appearance = 0 Combo1.Visible = True Combo1.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth Combo1.SetFocus End If End With End SubPrivate Sub Text1_LostFocus() Text1.Visible = False End Sub
mshflexgrid1 '属性不变
text1,combo1 'VISIBLE = FALSE代码如下:
Private Sub Combo1_Click()
Combo1.Visible = False
End SubPrivate Sub MSHFlexGrid1_Click()
With Me.MSHFlexGrid1
If .Col = 1 Then
Text1.Appearance = 0
Text1.BorderStyle = 0
Text1.Visible = True
Text1.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth, .CellHeight
Text1.SetFocus
End If
If .Col = 2 Or .Col = 3 Then
Combo1.Appearance = 0
Combo1.Visible = True
Combo1.Move .Left + .CellLeft, .Top + .CellTop, .CellWidth
Combo1.SetFocus
End If
End With
End SubPrivate Sub Text1_LostFocus()
Text1.Visible = False
End Sub