Edit Menu help

Hello friends,

 

I am developing web based flex application , which contains a menubar and few textinput controls.In the menu bar i have edit menu which includes cut,copy,paste,find,replace.The keyboard shortcut and context menu item for cut,copy,paste of the textinput are working fine.But i need to implement this funtionalties(cut,copy, paste,find,replace)in my custom menubar.How can i do this?.Please suggest me some good ideas and examples.

 

Regards
Heman
flex_mduAsked:
Who is Participating?
 
lexxwernConnect With a Mentor Commented:
Assuming you want to Cut, Copy, Paste, Search and Replace contents of a RichTextEditor or TextArea control:

1. For Find and Replace functionalities you can use the search, replace methods and Regular Expressions available for Flex String objects.

2.
a) For Cut, Copy & Paste in a RichTextEditor: you can access the selected text thru the selection property which is of type TextRange
b) For Cut, Copy & Paste in a TextArea: you can access the selected text thru selectionBeginIndex and selectionEndIndex properties
c) Once you have the selected text, it is just a matter of doing a combination of the following tasks: Storing the text in a variable, searching for the text, replacing the text, inserting the text inside the existing string.
0
 
flex_mduAuthor Commented:
can you giv some example code snippet
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.