Usable properties of RichTextEditor Control in flex.

January 19, 2008

RichTextEditor Control has many properties as it has many editable options init.

If u wanted to hide the different buttons at the controlbar use the property showControlBar and set it as false.It will hide the controlbar which will also hide the buttons on it.

And what if i want to hide a particular button or control in RTE.Then there are many properties for that for each one.

linkTextInput -> for link bar on control bar.

alignButtons ->for alignment buttons.

boldButton ->for bold button

colorPicker ->for color picker

italicButton ->for italic button

underlineButton ->for underline button

fontFamilyCombo ->for font family box.

fontSizeCombo ->for font size box.
bulletButton ->for bullet button.

_VRule1 ->for v rule 1 button.

_VRule2 ->for v rule 2 button.

Code Example:

private function init():void
{
rte.linkTextInput.visible=false;
rte.alignButtons.visible=false;
rte.boldButton.visible=false;
rte.colorPicker.visible=false;
rte.italicButton.visible=false;
rte.underlineButton.visible=false;
rte.fontFamilyCombo.visible=false;
rte.fontSizeCombo.visible=false;
rte.bulletButton.visible=false;
rte._VRule1.visible=false;
rte._VRule2.visible=false;
rte.showControlBar=false;
}

<mx:RichTextEditor x=”315.5″ y=”40″ id=”rte”> </mx:RichTextEditor>

This shows the difference .. !

RichTextEditor with editable controls hidden..

leave any comment for queries..


Asign icons to Tree control in flex.

January 19, 2008

There are icons asigned to Tree control for folderOpen, folderClose and for leaf nodes.The folder icon for folder open and close and one leaf icon.What if i want to change this default icons of Tree control.. its simple !.

The properties we got to use here is that:

folderOpenIcon -> for folder Open.

folderClosedIcon ->for folder close.

defaultLeafIcon ->for leaf icon.

Example:

<mx:Tree x=”10″ y=”10″ folderOpenIcon=”@Embed(’images/fopen’)” ></mx:Tree>

Similarly for other properties..!