Link to home
Create AccountLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

minimize and maximize <mx:RichTextEditor>

hi guys
I have a question in flex, i have bunch of <mx:RichTextEditor> boxes on my screen like this

<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
              creationComplete="init()"
              horizontalAlign="left"
              verticalAlign="top">
<mx:VBox width="1058" styleName="responseBox" height="264">
<mx:HBox width="1051">
<mx:RichTextEditor id="strbenefits2" width="1051"
  title="Question 1:  List number of Players impacted:"
 text=" answer"
 height="261"/>
</mx:HBox>                  
</mx:VBox>
            
 ...a bunch of such RichTextEditor boxes
            
      
</mx:VBox>       


The problem is when the page loads , the <mx:RichTextEditor> boxes are big so they take up lot of space on the screen. so i was thinking
when the screen loads, i want the <mx:RichTextEditor>  boxes to be minimized showing only the title (example 'Question 1:  List number of Players impacted').
only when user puts the mouse cursor on the box it should expand to its size and also should be able to edit it.
When mouse cursor moves away it should minimize again.

Is that possible?

thanks
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Jay Roy

ASKER

just tried that. getting this error on  init()
>>><mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
              creationComplete="init()"
              horizontalAlign="left"
              verticalAlign="top">

error on init() , incorrect number of arguments.


you need to remove init() call in VBox or rename my function.
I don't know full your code, be smart :)
Avatar of Jay Roy

ASKER

yep, just a rename.
it works but here is the problem

my richtexteditor is wrapped in a <mx:VBox> like this

<mx:VBox width="1058" styleName="responseBox" height="264">
<mx:HBox width="1051" >
<mx:RichTextEditor id="strbenefits2" width="1051" title="Question 1:  List number of Players impacted:"
  text=" answer"   maxHeight="261" creationComplete="init(event)"/>
</mx:HBox>
</mx:VBox>      

so when it is in minimized state the height of VBox(264) still shows up which i dont want, so i think i have to dynamically change the height of VBox on minimize and expand, any idea i can do that?

thx.
Just don't set height for any parents
Avatar of Jay Roy

ASKER

thanks!

any help with this simple question is appreciated.

https://www.experts-exchange.com/questions/26920117/show-hide-on-MOUSE-OVER.html