Skip to main content
Inspiring
November 5, 2015
Answered

[JS] Popup menu display to right-click in ScriptUI listBox.

  • November 5, 2015
  • 1 reply
  • 1106 views

HI,

Is it possible to display a pop-up menu to the right mouse click in ScriptUI listBox?  And how to add function of the popup menu?

If possible, please tell me how.

Thanks.

+ Is it possible generate an event to the double-click in ScriptUI listBox?

This topic has been closed for replies.
Correct answer Peter Kahrel

http://www.kahrel.plus.com/indesign/scriptui-2-8.pdf‌, p. 84, shows an example of how to detect a right-click. In the example you can replace this line:

{$.writeln ("Right-button clicked.")}

with code that shows a palette.

Peter

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
November 5, 2015

http://www.kahrel.plus.com/indesign/scriptui-2-8.pdf‌, p. 84, shows an example of how to detect a right-click. In the example you can replace this line:

{$.writeln ("Right-button clicked.")}

with code that shows a palette.

Peter

K159Author
Inspiring
November 6, 2015

Thanks Peter.

But I would like to display popup menu to right-click like below.

Is it impossible?

Peter Kahrel
Community Expert
Community Expert
November 6, 2015

Do you mean that you want to display one of the OS's context menus? If that's the case, then no, you can't do that.