Disable keystrokes for actions in the right pop up menu

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Disable keystrokes for actions in the right pop up menu

Postby Cherllea » Wed Mar 04, 2009 3:16 pm

Hi,
I am just trying out various things with RSyntaxtextarea. There is one bit am stuck with.
How to disable the keystrokes for all/any actions that can be done in the text area. i.e. I dont want to be able cut the xml code by the right click popup menu option or Ctrl+X. How to set the CutAction's accelerator key as null?
thanks
Cherllea
Cherllea
 

Re: Disable keystrokes for actions in the right pop up menu

Postby robert » Wed Mar 04, 2009 9:06 pm

Is setEditable(false) what you're looking for?

Note also you can turn off the popup menu with setPopupMenu(null), however that shouldn't be necessary if you call setEditable(false), as that will automagically disable cut, paste, etc.
User avatar
robert
 
Posts: 760
Joined: Sat May 10, 2008 5:16 pm

Re: Disable keystrokes for actions in the right pop up menu

Postby cherllea » Thu Mar 05, 2009 9:54 am

Hey thanks,
setEditable(false) works like a gem. This never struck me.

cheers,
Cherllea
cherllea
 


Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron