Jump to content
Software FX Community

Dual Panes and Modifying Properties On Non-Primary Panes


ARissing

Recommended Posts

I was looking into an issue from a user who had a problem with one of our charts that had two panes on it.  They were trying to modify the Y-Axis' min/max values, but could not as each time they would right click they would get the properties for the first pane (the main pane).  I looked into it and it seems the HitTest method used in the chart does not take into account the possibility of a second pane in the charts and it could be overcome pretty easily.

For now, I implemented a workaround and decided to post it so that others may be able to overcome the problem if they run into it: 

private void chtMain_InternalCommand(object sender, CommandUIEventArgs e)

{

  switch (e.CommandId)

  {

  case (int)CommandId.Options:

  // In a two pane chart, we need to force the properties for the second pane.  if ((this.chtMain.Panes.Count > 1) && this.chtMain.Panes[1].BoundingRectangle.Contains(this.m_pntRightClickForMenu))

 {

 e.Handled =

true; this.chtMain.ShowPropertiesDialog(this.chtMain.Panes[1].AxisY, 0);

 }

break;

 }

 }

 Btw, the "this.m_pntRightClickForMenu" is captured from the right click on the chart to determine where the user right clicked.  Something I would wish we could get from exposing the context menu itself, but hey a man's got to have dreams right ;-) 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...