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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...