Jump to content
Software FX Community

Wrong CommandId on InternalCommand


markus01

Recommended Posts

I try to handle gallery change because I want to do some configurations depending on selected gallery.

But CommandUIEventArgs from event InternalCommand has always CommandId = Line.

I think CommandId should be 'Gallery' and the SubCommandId should be the selected gallery. Is it a bug?

How can I get the selected gallery ?

 

Best regards,

Markus 

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Ok, I played a little bit and found the trick.

You must must add SubCommandId to e.CommandId to get real gallery type which was clicked. ( Otherwise e.CommandId is always CommandId.Line )

Here's my code:

    private void chart1_InternalCommand(object sender, ChartFX.WinForms.CommandUIEventArgs e)   {   int clickedCommandId = e.CommandId + e.SubCommandId;   switch (commandId)   {   case (int)CommandId.Pie:   //Do somesthing   break;   ...   }   }

 

@SoftwareFX support: This behavior is a little bit strange. Why e.CommandId is not set to clicked commanId?

 

Markus 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...