Page 1 of 1
Text Field - Right Mouse Click?
Posted: Fri Apr 09, 2021 4:03 pm
by cmhjon
Hi all,
In my compiled app for Windows, right-clicking within a text field does not display the usual Windows context menu that includes copy/paste functions. Is there a way to get the contextual menu to display?
Thank you,
Jon

Re: Text Field - Right Mouse Click?
Posted: Fri Apr 09, 2021 4:20 pm
by Klaus
Hi Jon,
yes, "do it yourself"!
Means that you need to create an appropriate "popup" menu button and let it pop up:
Code: Select all
on mousedown tMouse
if tMouse = 3 then
popup btn "you text menu here..."
end if
end mousedown
Best
Klaus
Re: Text Field - Right Mouse Click?
Posted: Mon Apr 12, 2021 2:04 pm
by cmhjon
Awwww man!
But ok. So, does this mean that I must also code what happens when someone right clicks a text field and chooses, "Paste"?
Thank you,
Jon
Re: Text Field - Right Mouse Click?
Posted: Mon Apr 12, 2021 2:38 pm
by AxWald
Hi,
cmhjon wrote: ↑Mon Apr 12, 2021 2:04 pm
does this mean that I must also code what happens when someone right clicks a text field and chooses, "Paste"?
Yes.
Right-Click menus have not been regarded important enough to be implemented using the OS' system calls. So you have to code them yourself - have fun doing it in a way that doesn't look "self made" & clumsy ;-)
You may try to embed a browser window as field, so you can use JavaScript & HTML whenever LC script or LCs formatting capabilities are lacking - does the browser engine support standard OS context menus?
(And no, I cannot tell you why the mothership has taken this way instead of improving their very own product ...)
Have fun!