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

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


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

8 Replies

JA JayaLakshmi Syncfusion Team June 8, 2007 09:07 AM UTC

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


UB Ubaid June 8, 2007 10:45 AM UTC

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


JA JayaLakshmi Syncfusion Team June 8, 2007 01:15 PM UTC

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


UB Ubaid June 8, 2007 10:02 PM UTC


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


JA JayaLakshmi Syncfusion Team June 11, 2007 09:10 AM UTC

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


UB Ubaid June 11, 2007 01:01 PM UTC

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



JA JayaLakshmi Syncfusion Team June 11, 2007 02:03 PM UTC

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


UB Ubaid June 12, 2007 05:35 AM UTC


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

Loader.
Live Chat Icon For mobile
Up arrow icon