The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How can I keep the popup box open until the user clicks the enter key? I am using the popupcontrol container and I need to override the normal behavior so that the popup only closes when the enter key or the ok button is pressed.
The users want the information in the popup box to be visible when they switch between applications.
ADAdministrator Syncfusion Team May 2, 2005 03:17 PM UTC
Hi Greg,
Setting PopupControlContainer.IgnoreMouseMessages to true should provide the behavior you described.
Regards,
Gregory Austin
Syncfusion Inc.
GSGreg ShometteMay 2, 2005 07:56 PM UTC
Hi Gregory,
I had already tried the IgnoreMouseMessages and that works fine as long as I stay within the application; however, when I switch to another application the popup goes away. The users want to be able to switch between applications without the popup dissappearing. I do not know if this is possible or not.
>Hi Greg,
>
> Setting PopupControlContainer.IgnoreMouseMessages to true should provide the behavior you described.
>
>Regards,
>Gregory Austin
>Syncfusion Inc.
ADAdministrator Syncfusion Team May 2, 2005 08:35 PM UTC
Hi Greg,
The best way to keep the popup open would be to handle the Form''s Deactivate event and call Show() on the PopupControlContainer. Calling Show will cause the control to be shown without any of the automatic closing behavior built into ShowPopup. The following code snippet demonstrates this:
bool isPopupUp;
//You need to set popupLoc yourself whenever you call ShowPopup
Point popupLoc;
private void Form1_Deactivate(object sender, System.EventArgs e)
{
this.isPopupUp = this.popupControlContainer1.IsShowing();
if (this.isPopupUp)
{
this.popupControlContainer1.Show();
}
}
private void Form1_Activated(object sender, System.EventArgs e)
{
if (this.isPopupUp)
{
this.popupControlContainer1.Hide();
this.popupControlContainer1.ShowPopup(this.popupLoc);
}
this.isPopupUp = false;
}
This solution does have the drawback of drawing the Popup over other windows, but it will stay open while the Form doesn''t have focus. Please let me know if you have any further questions on this topic.
Regards,
Gregory Austin
Syncfusion Inc.