Back to Devexpress

TokenEdit.GetPopupEditForm() Method

windowsforms-devexpress-dot-xtraeditors-dot-tokenedit-7ba8415a.md

latest3.2 KB
Original Source

TokenEdit.GetPopupEditForm() Method

Returns the control’s popup window.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public virtual TokenEditPopupForm GetPopupEditForm()
vb
Public Overridable Function GetPopupEditForm As TokenEditPopupForm

Returns

TypeDescription
DevExpress.XtraEditors.Popup.TokenEditPopupForm

An object that is the control’s popup window. null ( Nothing in VB) if the popup window has not been opened yet.

|

Remarks

At runtime, the control’s popup window can be opened with a click on the control’s dropdown button, or in code using the PopupBaseEdit.ShowPopup method. After the popup window has been opened for the first time, you can use the GetPopupEditForm method to get access to the popup window object. If the popup window has not been opened yet, the GetPopupEditForm returns null ( Nothing in VB). Typically, you will be calling the GetPopupEditForm method in the PopupBaseEdit.Popup event handler to get access to the popup window after it has been opened. In the event handler, you can adjust the popup window settings, or handle its events. See the code below.

csharp
private void tokenEdit1_Popup(object sender, EventArgs e) {
    DevExpress.XtraEditors.TokenEdit edit = sender as DevExpress.XtraEditors.TokenEdit;
    if (edit != null){
        DevExpress.XtraEditors.Popup.TokenEditPopupForm popupForm = edit.GetPopupEditForm();
        // ... 
    }
}
vb
Private Sub tokenEdit1_Popup(sender As Object, e As EventArgs) Handles TokenEdit1.Popup
    Dim edit As DevExpress.XtraEditors.TokenEdit = TryCast(sender, DevExpress.XtraEditors.TokenEdit)
    If edit IsNot Nothing Then
        Dim popupForm As DevExpress.XtraEditors.Popup.TokenEditPopupForm = edit.GetPopupEditForm()
        ' ...
    End If
End Sub

See Also

BeforePopup

ShowPopup()

QueryPopUp

Popup

ClosePopup()

QueryCloseUp

CloseUp

Closed

TokenEdit Class

TokenEdit Members

DevExpress.XtraEditors Namespace