Hello,
I'm trying to build a system which lets users format selected text from an input field using a drop down menu. So the idea would be that you could select some text, go to the "format" menu, choose "italic" and the selection would be italicised.
I'm using the Adobe MenuBar and Menu components from Flash 8.

The problem is that clicking on the menu removes the selection from the text. I can use Selection.getEndIndex and Selection.getBeginIndex to record the selection state and so I know which bit of the text to format. This works fine. The problem is when you click on the menu the selection still disappears which is ugly and awkward for the user and even when I use SetSelection to put the selection back once the menu item has been chosen the MenuBar fires some event which removes it again.

So my question is, Has anybody else done this and made it work?
 I've considered
- Clever hacks to "fake" the selection being there - only there doesn't seem to be a easy way to inverse the text in a textfield to fake a selection box. - Is there a way to stop the MenuBar taking the focus and clearing the selection? - Are there other MenuBar components out there which don't take the focus and selection so wouldn't have this problem.

I've been looking at other text editors built in Flash like www.flashtexteditor.com and they either use buttons for text formatting or suffer from the "selection disappears" problem so it may be insolvable. Either way I'd be interested to hear what other people have done.

Cheers

Joe


Joe Cutting
Computer exhibits and installations
www.joecutting.com
96 Heslington Road, York, YO10 5BL
01904 627428
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to