Jump to content
Software FX Community

Dynamic User Commands


peterz
 Share

Recommended Posts

If I understand user commands correctly, the only way I can add a user command to the chart's toolbar or one of its context menus is to first add the user command to the chart's Commands collection. Is that correct?

But in my case I have a need for the user commands to be dynamic, ie. the list of user commands may change over the lifetime of the chart. Some will be added and others will need to be removed. And I may need to repeat that cycle, including re-adding the same commands.

How can I remove a user command added to the chart's Commands collection? I see no API exposed to allow that.

Link to comment
Share on other sites

The idea of the command collection is that it doesn't change.

Notice that commands in the collection doesn't necessarily appear anywhere in the UI, as a mater of fact Chart FX has many commands that don't appear by default.

You should add all the possible commands to the collection and then add them ad remove the from the corresponding UIs (toolbar, context menus) according to your dynamic logic.

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.

 Share

×
×
  • Create New...