SkillCubes Posted January 25, 2008 Report Share Posted January 25, 2008 ChartFX Support,I'm trying to setup several new subcommands onto the chart, and need some assistance. I can successfully insert my new commands into the 'Series Context Menu' for the chart, name them, and catch them with postbacks or client scripts. But I need help to: 1) associate my own icons with my new subcommands. I've even tried 'getting' the chartFX ImageIndex for existing well known commands, and setting my user subcommand to use that well known ImageIndex but no luck. I just get a red x for the subcommand icon. 2) close the context menu after I catch the command with a client java script. After I handle the subcommand event, the chart context menu lingers there on the WebForm. How do I .close() that pesky little thing? Environment: ChartFX 7.0 (Dev Studio 2005), Visual Studio 2005, .Net 2.0, C#, WebForms .aspx pages Here's my C# aspx code behind // access the chart command collection CommandCollection cmds = Chart2.Commands; string imagePath = Server.MapPath("~/Common/Images/1.bmp"); int num = cmds.AppendImage(System.Drawing.Bitmap.FromFile(imagePath )); // create a new chart Command newCmd = new Command(2220); newCmd.Text = "My New Command";newCmd.ImageIndex = num;newCmd.GeneratePostBack = true; cmds.Add(newCmd); // access the chart's Series Context Menu, and add the new command Command contextMenu = Chart2.Commands[CommandId.ContextMenuSeries]; contextMenu.SubCommands.Add(2220); Thanks for the assist.... SkillCubes Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.