Jump to content
Software FX Community

wlo413

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by wlo413

  1.  Hello Carlos

    Thanks for the help, that was exactly what I needed. However to correct a typo in your code example to remove the Data Grid from the main context menu.

    Int32
    index = chart1.Commands[CommandId.
    ContextMenuBack].SubCommands.IndexOf((Int32)CommandId.DataGrid);


    chart1.Commands[CommandId.Gallery].SubCommands.RemoveAt(index);

     

    CommandID.Gallery should be replaced with CommandID.ContextMenuBack

    I knew exactly what you meant though ;)

     

  2.  Ok, that example makes sense. However, which attribute of CommandID refers to the context menu?Also, when I apply the example to remove the Data Grid item from the tool bar in my code snippet: Int32 index = chart1.Commands[CommandId.ToolBar].SubCommands.IndexOf((Int32)CommandId.DataGrid);chart1.Commands[CommandId.ToolBar].SubCommands.RemoveAt(index);I get an ArgumentOutOfRangeException because the index is always returning -1. I can remove the DataGrid item from the toolbar by manually figuring out its index and using this:chart1.ToolBar.RemoveAt(14);But I can't seem to add the DataGrid item back becausechart1.Commands[CommandId.ToolBar].SubCommands.Add(CommandId.DataGrid);doesn't appear to be doing anything.

  3.  Is it possible to remove some of the items in the context menu that shows up when a user right mouse clicks on a chart?

    I am using 

    chart1.ContextMenu.MenuItems.RemoveAt(1);

    however, this keeps throwing a NullReferenceException.

     

    Likewise, is it possible to add an item, previously removed, back into the context menu? What I want to do is, hide the Data Grid item until a certain condition is met. Once this condition is satisfied, show the Data Grid item.

    I want to do the same thing to the Data Grid item on the toolbar as well.

  4. I have the Gallery button on the toolbar visable in my chart. For my chart, I do not need to have my chart represented in every chart available. Actually, the data I have is not suitable for some of the charts. Is there a way to hide specific charts from the gallery menu?

    All I want selectable in the Gallery are the Line, Curve, Area, CurveArea Scatter, and Bar charts.

×
×
  • Create New...