We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Question about popup container.....

Thread ID:

Created:

Updated:

Platform:

Replies:

18257 Aug 26,2004 04:35 PM UTC Aug 27,2004 01:49 PM UTC Windows Forms 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On August 26, 2004 04:35 PM UTC

Is there a way to get the popup for a combo box, to function like a dialog form (modal form). What I want to do is have the user not be able to click out of the popup until they click a button in this popup that signals and end (and as such, validates what the user entered). I was close to accomplish this, but had some things not trappable. This included the switching programs (when you come back the popup is gone), click on the parent form and other events that I wasn''t sure how to keep from happening. Any help would be appreciated. I currently got the combo box working with a borderless form, and that seems to do what I want, but I have a few issues that don''t exist with the use of a popup, that I rather not have to deal with. Thanks, Javier

Administrator [Syncfusion]
Replied On August 26, 2004 06:19 PM UTC

Hi Javier, Presently, the ComboDropDown''s PopupControlContainer cannot be displayed as a purely modal dialog. A workaround here would be to handle the BeforePopup event of the PopupContainer and then display a custom form modally in its position. Form2 popupForm; private void PopupContainer_BeforePopup(object sender, CancelEventArgs args) { args.Cancel = true; popupForm = new Form2(); popupForm.BackColor = Color.LightSkyBlue; popupForm.FormBorderStyle = FormBorderStyle.None; popupForm.Width = this.comboDropDown1.Width; popupForm.Height = this.comboDropDown1.Width; popupForm.StartPosition = FormStartPosition.Manual; popupForm.Location = this.PointToScreen(new Point(48, 77)); popupForm.ShowDialog(); } Please refer to the sample that illustrates this and letm eknow if this meets your requirements. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On August 26, 2004 06:53 PM UTC

I''m doing the same thing in slightly diffrent way, the problem I am having is my combobox button stays in "pushed mode". I''m using OfficeXP style. If you change the style on your example, it seems to have the same problem. How do you fix this???

Administrator [Syncfusion]
Replied On August 27, 2004 01:49 PM UTC

Hi Javier, Thanks for the update. I do see this problem here. A workaround here would be to handle the PopupControlContainer''s Popup and CloseUp events instead of the BeforePopup event. this.comboDropDown1.PopupContainer.Popup += new EventHandler(this.PopupContainer_Popup); this.comboDropDown1.PopupContainer.CloseUp += new PopupClosedEventHandler(this.PopupContainer_CloseUp); private void PopupContainer_Popup(object sender, EventArgs e) { this.comboDropDown1.PopupContainer.HidePopup(); } private void PopupContainer_CloseUp(object sender, PopupClosedEventArgs args) { popupForm = new Form2(); popupForm.BackColor = Color.LightSkyBlue; popupForm.FormBorderStyle = FormBorderStyle.None; popupForm.Width = this.comboDropDown1.Width; popupForm.Height = this.comboDropDown1.Width; popupForm.StartPosition = FormStartPosition.Manual; popupForm.Location = this.PointToScreen(new Point(48, 77)); popupForm.ShowDialog(); } Please refer to the modified sample attached here that shows this workaround, and let me know if this works for you. Thanks for your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;