Size in FLex

Ads
 

Size in FLex

Hi...

I just want to know about...
What happens in measure()?
measuredHeight, measuredWidth, measuredMinHeight, measuredMinWidth are set.
please give me an example with description...

Thanks

View Answers

October 20, 2010 at 5:59 PM

Ans:

The measure() method sets the default component size, in pixels, and optionally sets the component's default minimum size.

Flex schedules a call to the measure() method when a call to the invalidateSize() method occurs. The measure() method executes during the next render event after a call to the invalidateSize() method. When you use the addChild() method to add a component to a container, Flex automatically calls the invalidateSize() method.

for example:

package myComponents
{
    import mx.controls.Button;

    public class BlueButton extends Button {

        public function BlueButton() {
            super();
        }

        override protected function measure():void {
            super.measure();

            measuredWidth=100;
            measuredMinWidth=50;
            measuredHeight=50;
            measuredMinHeight=25;
        }
    }
}

The following application uses this button in an application:

<?xml version="1.0"?> 
<!-- asAdvanced/ASAdvancedMainBlueButton.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:MyComp="myComponents.*" >

    <mx:VBox>
        <MyComp:BlueButton/>
        <mx:Button/>
    </mx:VBox>
</mx:Application>

Ads









Related Tutorials/Questions & Answers:
Flex Looping
Flex Looping  I need example for flex looping mechanisam example
Flex Combobox
Flex Combobox  flex combobox with database as dataprovider   You can visit the following link for detailed tutorial on the topic. May this will be helpful to you. http://www.roseindia.net/flex/flex-combo-box.shtml
Advertisements
Sitemap Adobe Flex Tutorial
Introducing Flex | Downloading and Installing Flex | Downloading and Installing Flex Builder | Compiling MXML application | Eclipse flex ant coding | Compiling MXML files with FlexBuilder | Flex Combo Box
Flex Updates
Flex Updates  Sir, first Thanks For Good Resource for Every One! i am New to Flex... but,in Current Updates Tell Us Flex Becomes To down!(Sorry To say).. May I know Future groom & Advantage of Flex Over Other Web
Adding a flex table in another flex table column
Adding a flex table in another flex table column  how to add a flex table in another flex table column
Flex with JSP
Flex with JSP  i want to draw chart in jsp page using flex. how can i do that? any solution??   Flex charts You can visit the following links: http://www.roseindia.net/tutorial/flex/flex4/components/charteffect.html
HTML in Flex
Flex application? Please give an example so i can implement it in my apps Thanks  Ans: Yes, you can embed HTML in flex application. You will use the TextArea component for embed An HTML in flex application
Flex-Question
Flex-Question  Hi, i have to take a DOB(date of birth) field and from here i have to calculate age. i am tryin but i am not getting the result......... pls help me
FLex Tree
FLex Tree  I want to change the node name in flex tree my code is: Company:XML = <Element name ="Element" code="400"> <{newChild} name ={newChild1} code="400"/> ; where comapny is dataprovide for tree. I want
Question about a flex...
Question about a flex...  Is there good Future for Adobe flex
Flex Combobox
Flex Combobox  flex combobox with database as dataprovider  ... on the topic. May this will be helpful to you. http://www.roseindia.net/flex/flex-combo-box.shtml
flex
ModuleNotFoundError: No module named 'flex'
ModuleNotFoundError: No module named 'flex'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'flex' How to remove the ModuleNotFoundError: No module named 'flex' error
ModuleNotFoundError: No module named 'flex'
ModuleNotFoundError: No module named 'flex'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'flex' How to remove the ModuleNotFoundError: No module named 'flex' error
Guide me to learn Flex
Guide me to learn Flex  Guidance to learn Flex Thanks in Advance. Kamal   Please visit the following link: Flex Tutorials
Flex Tutorial
Flex Tutorial In this section we will discuss about Flex. This section describes you the aspects of Flex such as what is Flex, benefits of flex, flex architecture, flex integration with different technologies, flex download, flex
Flex Howto
Flex Howto       In this section, you will find miscellaneous articles in flex and will be introduced... flex applications. 1. Create Modal Window
Item renderer in flex
Item renderer in flex  Hi...... please tell me about How to create item renderers in flex? give an example for that Thanks
track file size changes
track file size changes  How to track a change in file size
javascript max size
javascript max size   How to retrive Max size in JavaScript
Servletoutputstream size limit.
Servletoutputstream size limit.  What is the maximum size of ServletOutputStream
How to save user interface in flex for design tool
How to save user interface in flex for design tool  Hi I want to create a flex application "sticker design tool" in which i want to save all the caption/logos used with its properties like size,position,textcolor etc.,so when
Servletoutputstream size limit.
Servletoutputstream size limit.  What is the maximum size of ServletOutputStream?   By default size is set to 10MB.You can increase your message size maximum 2000000000 bytes. That is size limit is 2000000000
Flex Introduction
Flex Introduction       Flex is an open source framework developed by Adobe for creating rich internet applications. Flex based applications provide real time rich experience
which one is better, Flex or Java?
which one is better, Flex or Java?  Does flex has a scope to survive in IT? Which one of these two, Flex and Java, has a better scope of survival
hibernate.jdbc.batch_size
In this section, you will learn about the hibernate.jdbc.batch_size of the hibernate.cfg.xml.
size of all primitive data
size of all primitive data   java program for to find the size of all primitive data types in java
calculate size of array
calculate size of array  Is it possible to calculate the size of array using pointers in Java
Fixed size tables
Fixed size tables  Can anyone help me in creating a fixed size table in mysql database
Version of com.caucho>hessian-flex dependency
List of Version of com.caucho>hessian-flex dependency
Embed flex video
Embed flex video  Hi, I want to embed "application/x-shockwave-flash" content in my mxml.Basically I want to hit one url , get "application/x-shockwave-flash" content from it and display it in my mxml/swf.How to do

Ads