Print Page | Close Window

Popup menus in C#

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1514
Printed Date: 28 September 2024 at 7:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Popup menus in C#
Posted By: petst
Subject: Popup menus in C#
Date Posted: 11 December 2004 at 1:21pm

Is there any sample code available for popup menus in CSharp?

Thanks !




Replies:
Posted By: Boyd
Date Posted: 12 December 2004 at 10:11am

The following code can be used to create a basic popup menu:

// This instance created by Designer
private AxXtremeCommandBars.AxCommandBars commandBars;

// Create a Popup Menu
CommandBar popup;
popup = commandBars.Add("Popup Menu", XTPBarPosition.xtpBarPopup);

// Add Buttons
popup.Controls.Add(XTPControlType.xtpControlButton, 1000, "Caption", -1, false);

// Show the Popup at Point of a Click (where 'e' is the EventArgs
// passed from a mouse click event.  You can always specify the exact x-y coordinates.
popup.ShowPopup(0, e.X, e.Y);




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net