Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I was trying to show a popup menu when right clicking on a label. I saw that there's a button parameter in EvMouse which can be used to distinguish between mouse buttons, but I didn't find a way to get the same behaviour on a label.

I understand that the only way of handling clicks in labels is through the label_OnClick function and the EvText event which doesn't have an equivalent to the button parameter. Would it be possible to support this use case?

You must be logged in to vote

Hi @treequin

Using EvText in label_OnClick() is a design flaw. I'm replacing EvText with EvMouse, which is the correct approach. I'm also adding label_get_text() to be consistent with the rest of the SDK.

I'll upload the change as soon as possible.

Thanks for reporting.

Replies: 2 comments · 1 reply

Comment options

Hi @treequin

Using EvText in label_OnClick() is a design flaw. I'm replacing EvText with EvMouse, which is the correct approach. I'm also adding label_get_text() to be consistent with the rest of the SDK.

I'll upload the change as soon as possible.

Thanks for reporting.

You must be logged in to vote
1 reply
@treequin
Comment options

Much appreciated! Will keep an eye out for updates, then.

Answer selected by treequin
Comment options

@treequin
Fixed in this commit: c57f87f
Example here:
https://github.com/frang75/nappgui_src/blob/main/demo/guihello/sublayout.c#L104

onclick

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.