Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SelectedItem as sender parameter for OnActivated? #11

Closed
Jitnaught opened this issue Mar 24, 2021 · 2 comments
Closed

Use SelectedItem as sender parameter for OnActivated? #11

Jitnaught opened this issue Mar 24, 2021 · 2 comments
Labels
priority: p1 high A bug that might cause crashes or a highly needed feature status: completed The feature has been completed of the bug has been patched type: feature request Request to implement a specific feature
Milestone

Comments

@Jitnaught
Copy link

Would using the SelectedItem as the sender parameter for the Activated event make sense?

Here and here.

If SelectedItem is used for the sender parameter, then you could do something like this in the Activated event:

private void OnActivated(object sender, EventArgs e)
{
    if (sender == firstItem)
    {
        //do something
    }
    else if (sender == secondItem)
    {
        //do something else
    }
}

With the way it currently works (using the NativeMenu as the sender parameter) you are required to use an event for each individual item.

@justalemon justalemon added priority: p1 high A bug that might cause crashes or a highly needed feature status: acknowledged We are aware of the bug or feature request type: feature request Request to implement a specific feature labels Mar 25, 2021
@justalemon
Copy link
Member

Fun fact: This was requested multiple times, but nobody wanted to make a proper GitHub issue so I forgot.

@justalemon justalemon added this to the 1.3 milestone Mar 25, 2021
@justalemon
Copy link
Member

Added on 7d0bbaf

@justalemon justalemon added status: completed The feature has been completed of the bug has been patched and removed status: acknowledged We are aware of the bug or feature request labels Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 high A bug that might cause crashes or a highly needed feature status: completed The feature has been completed of the bug has been patched type: feature request Request to implement a specific feature
Projects
None yet
Development

No branches or pull requests

2 participants