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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ToolStripPanelItem

Thread ID:

Created:

Updated:

Platform:

Replies:

76127 Aug 23,2008 12:00 PM UTC Aug 27,2008 04:33 AM UTC WinForms 3
loading
Tags: Tools
John Slater
Asked On August 23, 2008 12:00 PM UTC

I am trying to set Office Mode properties at runtime. I have a ToolStripEx with ToolStripPanelItem's which each contains a ToolStripButton. I would like to be able to toggle the GroupedButtons state. I am iterating through the ControlsCollection and attempting to do this as follows:
if (cntl.GetType() == typeof(Syncfusion.Windows.Forms.Tools.ToolStripPanelItem))
((Syncfusion.Windows.Forms.Tools.ToolStripPanelItem)cntl).GroupedButtons = state;

However the GetType() never sees a ToolStripPanelItem in the ControlsCollection. It does find ToolStripEx and ToolStripInternal controls however.

Thanks


Administrator [Syncfusion]
Replied On August 26, 2008 12:03 PM UTC

Hi,

Thank you for your interest in Syncfusion Products.

You could try the following code to retrieve the ToolStripPanelItem's during runtime.

[C#]
foreach(ToolStripItem p in toolStripEx1.Items)
{
if (p is ToolStripPanelItem)
{
ToolStripPanelItem panel = p as ToolStripPanelItem;
foreach (ToolStripButton button in panel.Items)
{
listBox1.Items.Add(button.Text);
}

}
}

Please refer the below sample for your reference and let me know if this helps to you.
http://websamples.syncfusion.com/samples/Tools.Windows/F76127/main.htm

Please let me know if any concerns.

Regards,
Hema




John Slater
Replied On August 26, 2008 11:52 PM UTC

Thanks Hema, This will work fine.

>Hi,

Thank you for your interest in Syncfusion Products.

You could try the following code to retrieve the ToolStripPanelItem's during runtime.

[C#]
foreach(ToolStripItem p in toolStripEx1.Items)
{
if (p is ToolStripPanelItem)
{
ToolStripPanelItem panel = p as ToolStripPanelItem;
foreach (ToolStripButton button in panel.Items)
{
listBox1.Items.Add(button.Text);
}

}
}

Please refer the below sample for your reference and let me know if this helps to you.
http://websamples.syncfusion.com/samples/Tools.Windows/F76127/main.htm

Please let me know if any concerns.

Regards,
Hema






Administrator [Syncfusion]
Replied On August 27, 2008 04:33 AM UTC

Hi,

Thank you for the update.

Regards,
Hema


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

;