MSFlexGrid下拉列表

时间:2022-07-30 14:29:38 阅读: 最新文章 文档下载
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Private Sub Combo1_Click()

MSFlexGrid1.Row = MSFlexGrid1.RowSel

MSFlexGrid1.Col = 2

MSFlexGrid1.Text = Combo1.Text

End Sub

'rivate Sub Combo1_LostFocus()

'Combo1.Text = MSFlexGrid1.Text

'End Sub

Private Sub Form_Load()

Combo1.Visible = False

Combo1.AddItem "aaa"

Combo1.AddItem "quot;

Combo1.AddItem "ccc"

MSFlexGrid1.Cols = 10

MSFlexGrid1.Rows = 10

End Sub

Private Sub MSFlexGrid1_EnterCell()

If MSFlexGrid1.Col = 2 Then

MSFlexGrid1.CellBackColor = vbWhite

MSFlexGrid1.CellForeColor = vlue

Combo1.Move MSFlexGrid1.Left + MSFlexGrid1.CellLeft, MSFlexGrid1.Top + MSFlexGrid1.CellTop, MSFlexGrid1.CellWidth

Combo1.Visible = True

'Combo1.Text = MSFlexGrid1.Text

Else

Exit Sub

End If

' Combo1.SelStart = 0

' Combo1.SelLength = Len(Combo1.Text)

End Sub

Private Sub MSFlexGrid1_LeaveCell()

'If MSFlexGrid1.Col = 2 Then

MSFlexGrid1.CellBackColor = vbWhite

MSFlexGrid1.CellForeColor = vlue

'Combo1.Move MSFlexGrid1.Left + MSFlexGrid1.CellLeft, MSFlexGrid1.Top + MSFlexGrid1.CellTop, MSFlexGrid1.CellWidth

'MSFlexGrid1.Text = Combo1.Text

' Else

'Exit Sub

'End If

End Sub

'rivate Sub Combo1_Change()

'MSFlexGrid1.Row = MSFlexGrid1.RowSel

'MSFlexGrid1.Col = 2

'MSFlexGrid1.Text = Combo1.Text

'End Sub

Private Sub Timer1_Timer()

Timer1.Enabled = True

Combo1.Visible = False

End Sub

本文来源:https://www.wddqw.com/doc/7ca3c252be23482fb4da4c86.html