add f2 to open, backspace to clear
This commit is contained in:
@@ -15,6 +15,8 @@ Imports DevExpress.XtraGrid.Columns
|
||||
Public Class LookupControl3
|
||||
Inherits GridLookUpEdit
|
||||
|
||||
Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm"
|
||||
|
||||
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)>
|
||||
Public Shadows ReadOnly Property Properties As RepositoryItemLookupControl3
|
||||
Get
|
||||
@@ -36,6 +38,19 @@ Public Class LookupControl3
|
||||
e.Cancel = True
|
||||
End Sub
|
||||
|
||||
Private Sub LookupControl3_KeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp
|
||||
If e.KeyCode = Keys.F2 Then
|
||||
Dim oLookup As LookupControl3 = sender
|
||||
Dim oButton As EditorButton = oLookup.Properties.Buttons.
|
||||
Where(Function(b) b.Tag = TAG_BUTTON_LOOKUP_FORM).
|
||||
SingleOrDefault()
|
||||
|
||||
If oButton IsNot Nothing Then
|
||||
oLookup.PerformClick(oButton)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Shadows WithEvents fProperties As RepositoryItemGridLookUpEdit
|
||||
Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user