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. Image for the cookie policy date
close icon

Show PopupControlContainer upon ToolsStripEX DropDown

Using a ToolsStripEX I want to show a PopupControlContainer using a Drop Down type menu button.
(For variuos reasons, I don't want to use the XPToolMenu)

In the DropDownOpening, how do I show the PopupContainer at the proper placement?

I can't seem to determine the toolStripDropDownButton's location.






3 Replies

SR Sri Rajan Syncfusion Team January 29, 2008 10:43 PM UTC

Hi ERobishaw,

Thank you for your interest in Syncfusion products.

Please use the below code snippet to show a PopupControlContainer when you open the drop down dropdown button in ToolsStripEX.


private void toolStripDropDownButton1_DropDownOpening(object sender, EventArgs e)
{
Point pt=new Point(this.toolStripDropDownButton1.Bounds.X+this.toolStripDropDownButton1.Bounds.Width,this.toolStripDropDownButton1.Bounds.Y+this.toolStripDropDownButton1.Bounds.Height+40);
this.popupControlContainer1.ShowPopup(pt);
}


Please refer the below sample for more details.
http://websamples.syncfusion.com/samples/Tools.Windows/F71315/main.htm

Please let me know if this helps.

Regards,
Srirajan




ER ERobishaw January 30, 2008 05:36 AM UTC

Thanks, one thing:

Is there an easy way to have to toolstrip button stay orange (looking like its selected) while the popup is showing? I'm looking to emulate the behavior of the XPToolbar control's buttons w/ a popup in them.



AD Administrator Syncfusion Team February 10, 2008 05:33 PM UTC

Hi ERobishaw,

Sorry for the delayed response.

You can have toolstripbutton to stay selected while the popup is showing using following code snippet.

[C#]

private void toolStripDropDownButton1_MouseLeave(object sender, EventArgs e)
{
if (!this.toolStripDropDownButton1.Pressed)
{
this.toolStripDropDownButton1.Select();
}

}

Sample reference

Please refer the sample that illustrates the same.

http://websamples.syncfusion.com/samples/Tools.Windows/F71315_1/main.htm

Regards,
Jaya



Loader.
Live Chat Icon For mobile
Up arrow icon