Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Not able to reduce height even i reduce the component height from owner height.

Posted on 2011-03-17
4
Medium Priority
?
337 Views
Last Modified: 2012-05-11
Hi expert,

Could you please let me know how i can reduce height when i close TextArea in my code?
Here is the issue:
when i expand CollapsableHeader-->if i close Command Description(TextArea)-->well owner height is decreasing(screen shot 3)-->but when i collapse and expand again CollapsableHeader-->i see more empty space(more height) added in the bottom(screen shot 4).

In screen shot 4, Could you plse let me know, how i can avoid more height in the bottom even if i close CommandDescription.

onClick of CollapsableHeader i am calling server. so in onResult(),even of i add these statements, height is not reducing

if(arrow1.source=="assets/plus_16.png")
                                    {
                                          this.height += cmdSuggestionHt;
                                          owner.height += cmdSuggestionHt;
                                    }
                                    if(arrow1.source=="assets/minus_16.png")
                                    {                                          
                                          this.height -= cmdSuggestionHt
                                          owner.height -= cmdSuggestionHt
                                    }

Please any suggestion?



img1.bmp
img2.bmp
img3.bmp
img4.bmp
0
Comment
Question by:Alpita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:Alpita
ID: 35162647
Hi Experts,

This question belongs to Adobeflex Zone.

Regards,
Alpita
0
 
LVL 29

Expert Comment

by:dgofman
ID: 35163163
use maxHeight = 0; when you collapse and maxHeight = NaN for expand.
Do not modified a height parameter.
0
 
LVL 29

Accepted Solution

by:
dgofman earned 2000 total points
ID: 35169121
Your main problem is outisde CommandHelpComp component. You need just reduce height of parent holder:

<mx:VBox id="cmdbox5" resizeEffect="{resize}" width="700" height="500" backgroundColor="0xEEF9F8" horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <comp:CommandHelpComp id="cmdHelpComp" imagevisibleFlag="false"/>
</mx:VBox>

Also do not reset height of textfield

if(arrow1.source=="assets/plus_16.png")
{
      tA1.setStyle("focusAlpha", 0)
      tA1.setFocus();
      arrow1.toolTip = "";
      //tA1.height=cmdSuggestionHt      
                     vSug.visible = true;
      vSug.includeInLayout = true;
      arrow1.source="assets/minus_16.png"
      owner.height += cmdSuggestionHt;
} else
{
      arrow1.toolTip = "Click to write suggestion"
      //tA1.height=0      
                      vSug.visible = false
      vSug.includeInLayout=false
      arrow1.source="assets/plus_16.png"
      owner.height -= cmdSuggestionHt;
}
0
 

Author Closing Comment

by:Alpita
ID: 35173900
Thanks . It is working fine now.

Regards,
Alpita
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question