Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Flex Size in FLex

Have Programming Question? Ask it here!
 
 
 


bikrantsingh
Size in FLex
1 Answer(s)      3 years and 10 months ago
Posted 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


Advertisement
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>


Related Tutorials/Questions & Answers:
Size in FLex
Size in FLex  Hi..... What is the difference between width, explicitWidth, measuredMinWidth, measuredWidth, and percentWidth? please tell me about that difference Thanks
Size in FLex
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
Advertisements
Set the size of visual component in Flex4
Set the size of visual component in Flex4: Flex 4 provide mechanism to set Size of the visual components. There are two different ways to set Size... the size of the controls and containers in flex 4. It is done Automatically
Size of commarea
Size of commarea  hii, What is the size of commarea?   hello, Default size of commarea is 65k
Set the size of visual components using action script in Flex4
Set the size of Visual Components using Action Script in Flex4: In this tutorial you can see how to set Size for a visual component in action script code in Flex 4. Example:   <?xml version="1.0"
CSS in Flex
in flex? Thanks  Ans: @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .button{ font-family:"Verdana"; font-size:16px; text-align:center; color:#990000; font
Flex Looping
Flex Looping  I need example for flex looping mechanisam example
Flex - Framework
Flex  database conectivity in flex
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
Flex event
Flex event  Hi.... Please tell me about How to create your own event in flex? Thanks
Flex and Java
Flex and Java  hi..... Please give similiarities between Java and Flex. Thanks
Flex basic
Flex basic  Hi...... please just tell me about Can we run Flex applications in MAC? Thanks
Style in Flex
on components in flex? please give me an example for each........ Thanks...://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; .button{ font-family:"Verdana"; font-size:14px; } .label{ font
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 and Java
Flex and Java  Hi.... What are the config files that are used to connect Java and Flex applications? Please provide the solution of this prob so i connect java and flex.... Thanks
Flex and Java
Flex and Java  Hi...... Give the name of Collection which can be mapped to java and Flex and vice-versa. please give the name of all collections which is used in flex and java.. Thanks
Flex basic
Flex basic  Hi.... Can flex application communicate with each other on the client? please give me the answer ASAP..... Thanks   Ans: See the LocalConnection API In the flex documentation. Thanks
Flex as a Service
Flex as a Service  Hi....... just tell me about How do I run Flex as a service? please give me an example if possible Thanks  Ans: Flex is not a server. It is the pert of your web application. you can use
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
Flex basic
Flex basic  Hi.... can you tell me about Is Flex OS specific or operating system independent? please give the description about it....... Thanks
Flex application
Flex application  Hi..... What kind of applications you can create from flex? please give the name of these applications....... Thanks
Flex basic
Flex basic  Hi.... I want to know Do we need any plugins to run Flex applications? please give the ans ASAP....... Thanks
Flex basic
Flex basic  Hi.......... I want to know about What is localToGlobal and globalToLocal in flex? please give me ans ASAP..... Thanks
Flex difference
Flex difference  Hi.... please tell me about What is the difference between Flex 2.0 and Flex 3.0? Thanks  Ans: There are some advantages of Flex3.0 over Flex 2.0 they are following: 1. Faster compilation time
Servletoutputstream size limit.
Servletoutputstream size limit.  What is the maximum size of ServletOutputStream
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?   By default size is set to 10MB.You can increase your message size maximum 2000000000 bytes. That is size limit is 2000000000
hibernate.jdbc.batch_size
In this section, you will learn about the hibernate.jdbc.batch_size of the hibernate.cfg.xml.
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
Flex basic
Flex basic  Hi...... Please tell me about What are non-visual components in flex? What class do they extend? please give the name of these components....... Thanks
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
Mask in Flex
Mask in Flex  Hi...... Is it possible to create 'gradient mask' in flex? please give me the ans ASAP..... Thanks in advance
Flex event
Flex event  hi...... How to capture and event if the component is disabled? please give an example..... Thanks in advance
Metadata in flex
Metadata in flex  Hi......... please tell me about the meta data in flex. Thanks
Image in Flex
Image in Flex  Hi..... Can you manipulate images using Flex programs? please give me the example....... Thanks
Flex Managers
Flex Managers  Hi... Please tell me about How to override Managers? give me an example for that.... Thanks
Adobe flex
Adobe flex  Hi... please give me the description about What is Adobe Flex? Thanks
XML in flex
XML in flex  Hi... just tell me about What is e4X and XML in flex? Thanks
Fixed size tables
Fixed size tables  Can anyone help me in creating a fixed size table in mysql database
calculate size of array
calculate size of array  Is it possible to calculate the size of array using pointers in Java
size of all primitive data
size of all primitive data   java program for to find the size of all primitive data types in java
Advantage of Flex
are the Advantages and Disadvantages of flex? Thanks   Advantages: Flex IDE is very capable. Flex output is a movie and images is the major part of this movie. you can not directly download the flex running file. When we right click
Flex event
Flex event  Hi.... please tell me about How does Flex event...: In the capturing phase, Flex examines an event target?s ancestors in the display list to see...: In the targeting phase, Flex invokes the event dispatcher?s listeners. No other nodes
setting web page size
setting web page size  How to set the webpage size in Java
Java Class Size
Java Class Size  How to determine size of java class
Max size of iPhone application
Max size of iPhone application  Hi, I am developing iPhone application. There are many images and videos. I want to know allowed max size in MB. What is the max size of iphone application? Thanks   Hi, I think
Flex basic
Flex basic  Hi........ I want to know about What will happen when you removeChild() and addChild()? please give me the ans ASAP....... Thanks
Style in flex
Style in flex  Hi...... I want to know about What is the difference between style and a property in flex? please give me an example...... Thanks
Image in Flex
Image in Flex  Hi..... List out the advantages and disadvantages of using Raster vs Vector images with flex. please tell me about this Thanks
Advertisements
 

 

 

DMCA.com