You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is a bit inconvenient that we do not have the ability to use a context menu for standard operations such as cut/copy/paste/select all/etc.
Describe the solution you'd like
Some way to add a context menu to the TextEdit widget without loosing the text selection information.
Describe alternatives you've considered
At first, I tried to go with a straightforward solution of calling a "context_menu" on the "Response" returned by the "TextEdit::ui", but it didn't work at all. No context menu on the right click appeared.
Then, I added the "context_menu" to the outer widget ("CentralPanel") and noticed that the context menu appears almost everywhere, but not on the TextEdit.
I ended up inspecting the "output.response.clicked_by(egui::PointerButton::Secondary)" property to find out that the "output.cursor_range" doesn't contain the actual selection. So, unfortunately, I can't use this workaround.
Additional context
Actually all I need is just a "copy" button that appears near the selected text which copies the selected text, so there might probably an easier solution than implementing a full-fledged context menu for the widget.
Thanks!!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It is a bit inconvenient that we do not have the ability to use a context menu for standard operations such as cut/copy/paste/select all/etc.
Describe the solution you'd like
Some way to add a context menu to the TextEdit widget without loosing the text selection information.
Describe alternatives you've considered
At first, I tried to go with a straightforward solution of calling a "context_menu" on the "Response" returned by the "TextEdit::ui", but it didn't work at all. No context menu on the right click appeared.
Then, I added the "context_menu" to the outer widget ("CentralPanel") and noticed that the context menu appears almost everywhere, but not on the TextEdit.
I ended up inspecting the "output.response.clicked_by(egui::PointerButton::Secondary)" property to find out that the "output.cursor_range" doesn't contain the actual selection. So, unfortunately, I can't use this workaround.
Additional context
Actually all I need is just a "copy" button that appears near the selected text which copies the selected text, so there might probably an easier solution than implementing a full-fledged context menu for the widget.
Thanks!!
The text was updated successfully, but these errors were encountered: