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.

How To stop Popup Menu from being closed when i click on ParentBarItem

Thread ID:

Created:

Updated:

Platform:

Replies:

62082 Jun 7,2007 08:24 AM Jun 12,2007 01:35 AM Windows Forms 8
loading
Tags: Tools
Ubaid
Asked On June 7, 2007 08:24 AM


Hi ... Em using XP PopupMenu and i want that it should'nt close when i click on items of type ParentBarItem and DropDownBarItem. Is there any way of doing so ????

I have tried setting up "CloseOnClick=false" on ParentBarItem but it works for its Child items.

Regards,
Ubaid Tariq

JayaLakshmi [Syncfusion]
Replied On June 8, 2007 05:07 AM

Hi Ubaid,

Thank you for your interest in Syncfusion products.

To prevent the PopupMenu from being closed, you can set e.Cancel to true in ParentBarItem PopupClosing event.

I have also attached a sample in the below location.
http://websamples.syncfusion.com/samples/Tools.Windows/F62082_new/main.htm

Kindly let me know if this helps.

Regards,
Jaya

Ubaid
Replied On June 8, 2007 06:45 AM

Hi jaya ... its not working.

PopupMenu Hierarchy is as follows:

ParentBarItem1
{
BarItem1
BarItem2
ParentBarItem2
{
BarItem3
}
}

Now what i want is that whenever i click on parentBarItem2, context Menu shuld'nt close.

Can you send me a code snippet to fix it??

Regards,
Ubaid Tariq

JayaLakshmi [Syncfusion]
Replied On June 8, 2007 09:15 AM

Hi Ubaid,

Thanks for the update.

Can you please refer the modified sample and let me know if this helps.

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

In the attached sample, when you click the ParentBarItem2, the subitem 'BarItem3' will not get closed.

If this is not your actual requirement, then please provide me sample or more details on this.

Thanks,
Jaya

Ubaid
Replied On June 8, 2007 06:02 PM


Hi Jaya ... there is a small issue ... the whole menu should close when i click on any of the bar item. In the attached solution, BarItem3 is always visible.

Scenario 1: If i drag mouse over parentBarItem2 and then click on baritem1 or baritem2, baritem3 is still visible, it should close.

Scnario2: If i click on baritem3, whole popup remains visible, it should disappear.

Scenario 3: If i drag mouse over ParentBarItem2 and then over Baritem2, barItem3 remains visible. it should close.

My exact requirement is that popup menu will behave like its default functionality. only when i click on any of the ParentBarItem, there should be no effect like i have never clicked on the ParentBarItem.

I want to copy functionality of Windows Default Context Menu. Just right click on the desktop and see its behavior. When i click on New/Arrange Icons By, there is no effect but when i click on any of the item which does not have subitems, the whole menu closes.

Thanks for your support.

Regards,
Ubaid Tariq

JayaLakshmi [Syncfusion]
Replied On June 11, 2007 05:10 AM

Hi Ubaid,

Thanks for the update.

Syncfusion PopupMenu comprises the behaviour of Windows Context Menu by default. Kindly refer the attached sample in the below link and let me know if this meets your requirement.

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

The attached sample displays PopupMenu on the right click of RichTextBox and meets all scenarios you specified by default.

Kindly let me know if you have any other queries.

Thanks for your patience.

Regards,
Jaya

Ubaid
Replied On June 11, 2007 09:01 AM

Hi Jaya ... its not working the way windows menu used to be. It should'nt close when i click parentBarItem2.

i think that i have explained the windows functionality quite thoroughly. Please have a look at the sample once again.

Regards,
Ubaid Tariq


JayaLakshmi [Syncfusion]
Replied On June 11, 2007 10:03 AM

Hi Ubaid,

I am afraid that I could not able to reproduce the issue you specified.

Could you please see the video file attached in the below location?

http://www.syncfusion.com/Support/user/uploads/Video_2e6b1c4f.zip

Also kindly let us know the Essential Studio version you are currently using now.

Thanks,
Jaya

Ubaid
Replied On June 12, 2007 01:35 AM


Hi jaya .... Em using 4.402.0.51

I have tried it on 5.102.0.51 and its working fine there ...

Thanks for your support and sorry for taking so much of your time.

Regards,
Ubaid Tariq

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.

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.

;