Right idea, wrong event.  Use creationComplete (another might work, but this 
is the safest):

<mx:RichTextEditor

id="my_rte"

width="100%" height="100%"

creationComplete="hideMofos()"/>



----- Original Message ----- 
From: "Tom Bray" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Tuesday, December 13, 2005 8:36 PM
Subject: Re: [Flashcoders] Flexbuilder 2: how can I hide subcontrols 
oftheRichTextEditor?


Thanks, Jesse.  Now, what if I want to hide those mofos automagically
when the app loads so the user never sees them?  I've been trying to
call the hideMofos() method like this:

<mx:RichTextEditor title="Input" id="my_rte" width="100%"
height="100%"  initialize="hideMofos()"/>

But I get a runtime error that makes me think I need to wait for those
subcontrols to initialize. Correct?

-Tom

On 12/13/05, JesterXL <[EMAIL PROTECTED]> wrote:
> This works:
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"; xmlns="*">
>
> <mx:Script>
>
> <![CDATA[
>
>
> private function hideMofos():Void
>
> {
>
> my_rte.fontFamilyCombo.visible = false;
>
> my_rte.alignButtons.visible = false;
>
> my_rte.linkTextInput.visible = false;
>
> }
>
> ]]>
>
> </mx:Script>
>
> <mx:Button
>
> label="Hide Buttons"
>
> click="hideMofos()" />
>
> <mx:RichTextEditor
>
> id="my_rte"
>
> width="100%" height="100%" />
>
> </mx:Application>
>
>
>
> ----- Original Message -----
> From: "Tom Bray" <[EMAIL PROTECTED]>
> To: "Flashcoders mailing list" <[email protected]>
> Sent: Tuesday, December 13, 2005 7:42 PM
> Subject: [Flashcoders] Flexbuilder 2: how can I hide subcontrols of
> theRichTextEditor?
>
>
> I'd like to hide the font chooser, align buttons, and the link text
> field in my RTE component.  My first attempt was to set the _visible
> property of the linkTextInput subcontrol to false in the RTE's
> initialize event handler.  This throws errors at runtime and they
> aren't particularly helpful at figuring out what the problem is.
>
> Thanks,
>
> Tom
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to