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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I create a context menu without icons

Thread ID:





20533 Oct 20,2004 02:52 PM UTC Oct 21,2004 06:01 PM UTC WinForms 1
Tags: Tools
Administrator [Syncfusion]
Asked On October 20, 2004 02:52 PM UTC

I''m trying to display a menu that does not have the icons shown along the left side. I''m using the following code: private void lnkChooseSubset_Click(object sender, System.EventArgs e) { Point ClickPoint = new Point(lnkChooseSubset.Right, lnkChooseSubset.Top); // Convert to Screen coordinates Point ScreenPoint = this.pnlSummary.PointToScreen(ClickPoint); // Convert from Screen coordinates to Form coordinates Point FormPoint = this.PointToClient(ScreenPoint); // Show subset context menu parentBarItem1.Items.Clear(); parentBarItem1.PaintStyle = PaintStyle.TextOnly; for (int i = 1; i < 10; i++) { BarItem pNew=new BarItem(); pNew.Text="Label - " + i.ToString(); pNew.Tag="Label" + i.ToString(); pNew.Click+=new EventHandler(PopItem_Click); pNew.ProvideFontInfo+=new ProvideFontInfoEventHandler(pNew_ProvideFontInfo); pNew.PaintStyle = PaintStyle.TextOnly; parentBarItem1.Items.Add(pNew); } popHomePageSubset.Show(this,FormPoint); } Note that I''ve set the PaintStyle to "TextOnly" and it does not work. Setting it to anything makes no difference...I always see a white vertical stripe down the left side of my menu whose background color is blue. What might I be doing wrong?

Administrator [Syncfusion]
Replied On October 21, 2004 06:01 PM UTC

Hi, Please refer to the test sample attached that shows how you could have a PopupMenu with BarItems in PaintStyle.TextOnly mode. If you are referring to the long vertical rectangle on the left side of the PopupMenu, then I would like to inform you that this is done by design intent and not a result of a bug in the BarItem''s PaintStyle property. Our XPMenus framework is closely modelled on the VS.NET''s menus and we have maintained similar behavior/look and feel for consistency purposes. If you are using Office2003 VisualStyle for the menus, this is exactly how the MS Office 2003 context menu looks too. Let me know if I have not understood your problem correctly. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon