Hi, welcome to Pivot!

Yes, there is.  In the tutorials section there are several tutorials on menus, 
including one on context menus (see here: 
http://pivot.apache.org/tutorials/context-menus.html).  This shows how to 
implement one using the standard right mouse click (by registering a 
MenuHandler with the component).  In order to use a key combination, you would 
have to register a key listener for the TextPane, then mimic what the 
right-click does (see the code in ApplicationContext.java around line 1000), 
which is basically to create an empty Menu object, then call the registered 
menu handler's "configureContextMenu" method (which you would implement).  So, 
pretty simple...

Feel free to contact us some more for more particulars, or if you are having 
problems.

HTH,
~Roger

-----Original Message-----
From: tryfon [mailto:tryfon.sterg...@avl.com] 
Sent: Wednesday, September 23, 2015 2:52 AM
To: user@pivot.apache.org
Subject: open context menu programmatically

i am creating an editor and and i would like to show a suggestion popup in a 
textpane. My idea is  to show a context menu with "suggestions" after pressing 
a keyboard combination(like eclipse Ctrl+Space).

Is there anyway to open context menu programmatically?

If someone has an other suggestion to implement this popup, i would like to 
hear it.However I have to use textpane because i color the text.



--
View this message in context: 
http://apache-pivot-users.399431.n3.nabble.com/open-context-menu-programmatically-tp4023022.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Reply via email to