RepositoryItemPopupBase.CloseUpKey Property
Gets or sets the key combination used to open and close the popup window.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
KeyShortcut | A KeyShortcut object specifying the key combination used to open and close the popup window. |
Remarks
Use the CloseUpKey property to specify the key combination that can be pressed while the editor has focus to invoke or hide its popup window. At design time, you can use the property editor to select the shortcut. You can also select the ‘custom‘ item within the property editor’s dropdown list to specify the desired shortcut by pressing it.
Attempts to open or close the dropdown window using the shortcut (or other means) raise the RepositoryItemPopupBase.QueryPopUp and RepositoryItemPopupBase.QueryCloseUp events respectively. These events’ handlers can prevent the action.
Note: end-users can use the ALT+DOWN ARROW key combination to show/hide the popup window regardless of the CloseUpKey property value. Thus, if you need to stop end-users from using this shortcut, set the CloseUpKey property to KeyShortcut.Empty. At design time, you need to select the ‘(none)‘ item within the property editor’s dropdown list.
Example
The following example assigns the Ctrl+Enter shortcut to the RepositoryItemPopupBase.CloseUpKey
property. This allows the end-user to press this key combination in order to open and close the dropdown window while accepting the selected value.