点单元格下拉窗口还没出来弹出会有下图提示,
选定行关闭下拉窗口后离开单元格也弹出来这个提示:
此主题相关图片如下:111.png
DropDownOpened
Dim txt As String = e.Form.DropDownBox.Text
Dim tbl As Table = Tables("款号录入_Table1")
If txt = "" Then
tbl.Filter = ""
Else
txt = "'%" & txt & "%'"
tbl.Filter = "款号 Like " & txt
End If
e.Form.DropDownBox.Select()
If e.Selected Then '如果选择了值
Dim tbl As Table = Tables("款号录入_Table1")
If tbl.Current IsNot Nothing Then
If e.Form.DropCol.name= "款号" Then
e.Form.DropDownBox.Value = tbl.Current("款号")
Tables("销售订单_table2").Current("客款号") = tbl.Current("客款号")
Tables("销售订单_table2").Current("货品名") = tbl.Current("货品名")
Tables("销售订单_table2").Current("系列") = tbl.Current("系列")
Tables("销售订单_table2").Current("尺码组") = tbl.Current("尺码组")
Tables("销售订单_table2").Current("款号ID") = tbl.Current("款号ID")
End If
End If
End If
Dim drp As WinForm.DropDownBox = e.sender
If drp.DroppedDown Then '如果下拉窗口已经打开
drp.CloseDropdown(False) '关闭下拉窗口
End If
Dim drp As WinForm.DropDownBox = e.sender
If drp.DroppedDown Then '如果下拉窗口已经打开
Dim tbl As Table = Tables("款号录入_Table1")
If e.KeyCode = Keys.Up Then '如果按下的是上箭头按键
tbl.Position = tbl.Position - 1 '向上移动一行
e.Cancel = True
ElseIf e.KeyCode = Keys.Down Then '如果按下的是下箭头按键
tbl.Position = tbl.Position + 1 '向下移动一行
e.Cancel = True
End If
End If
[此贴子已经被作者于2018/9/12 9:40:56编辑过]