Find/Replace example

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Find/Replace example

Postby fkonvick » Mon Sep 17, 2012 9:36 am

Hi,

I've seen some demo app in svn, but I'm not sure how to exactly use it with my RSyntaxTextArea... so far, I have just created a RSyntaxTextArea and put it in a JScrollPane. Is it possible to have the find/replace available in the pop-up menu (where I can see Select All, Copy, Paste and the like), and ideally also have Ctrl+F / Ctrl+H work?

Thanks,
Filip
fkonvick
 

Re: Find/Replace example

Postby robert » Tue Sep 18, 2012 2:56 am

Yes, this is possible. Canned Find and Replace dialogs are found in the RSTAUI project. Get that either from SourceForge or from Subversion. You can follow the demo application shipped with RSTAUI for a simple example of integrating the dialogs.

As for integrating it into the editor's popup menu, follow this example from the RSyntaxTextArea examples page. It shows how to add custom actions to the popup menu.

Good luck!
User avatar
robert
 
Posts: 802
Joined: Sat May 10, 2008 5:16 pm

Re: Find/Replace example

Postby fkonvick » Tue Sep 18, 2012 11:18 am

Robert,

Thanks a lot. The second example helped, it's very simple. And now even regex-style replace is working! Great!

Thanks,
Filip
fkonvick
 


Return to Help

Who is online

Users browsing this forum: No registered users and 6 guests

cron