[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

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
0
flex_mdu
Asked:
flex_mdu
1 Solution
 
lexxwernCommented:
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

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now