10 Replies Latest reply on Jun 7, 2012 10:22 PM by Flex harUI

    limits of containers (maxHeight=10000)

    ne_polle Level 1

      Hi there,

       

      I'm trying to fill a box with a color.

      The size of the box is as a set it (20000px), but the colored area is clipped by the default maxheight of 10000px.

      How could I get a box completly filled up with the choosen color?

       

      <mx:Canvas id="container1" width="1000" height="500" backgroundColor="0x009999" >

                          <mx:Box id="box" width="100" height="20000" x="100" y="100" backgroundColor="0x00ff00" maxHeight="20000" />

      </mx:Canvas>

       

      thanks for any advice

      Julia

        • 1. Re: limits of containers (maxHeight=10000)
          Flex harUI Adobe Employee

          Change the maxHeight of the container.

          • 2. Re: limits of containers (maxHeight=10000)
            ne_polle Level 1

            Hi

            thanks for the answer.

            I changed the maxHeight of each container and nothing changed.

             

            When you copy paste the following code:

             

            <?xml version="1.0" encoding="utf-8"?>

            <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                                             xmlns:s="library://ns.adobe.com/flex/spark"

                                             xmlns:mx="library://ns.adobe.com/flex/mx"

                                             minWidth="955" minHeight="600"

                                             maxHeight="20000"

                                             >

                      <mx:Canvas id="container1" x="200" y="300" width="1000" height="500" backgroundColor="0x009999"  maxHeight="20000">

                                <mx:Box id="box" width="100" height="20000" x="100" y="100" backgroundColor="0x00ff00" maxHeight="20000" minHeight="20000" />

              </mx:Canvas>

            </s:Application>

             

            and scroll down till the end of the Canvas you will see that the Box is'nt complitly filled with the choosen color.

             

            maybee another advice???

            • 3. Re: limits of containers (maxHeight=10000)
              Flex harUI Adobe Employee

              It looks like the skin has background rectangles with the default maxHeight of 10000.  You will need to modify the skin for at least the Box.

              • 4. Re: limits of containers (maxHeight=10000)
                Sainath.B

                Thanks for the answer. I am even stuck with the same problem. Could solve this in Flex 4 using below lines of code

                 

                <s:BorderContainer skinClass="skins.BorderContainerSkin" /> where BorderContainerSkin has

                <s:Group id="contentGroup" maxHeight="{Infinity}" maxWidth="{Infinity}"/>

                 

                How do we do the same thing in Flex 3? How to write skin for the box in the code snippet given by ne_polle?

                 

                Please help, I am using Flex 3.0

                 

                Thanks in advance

                • 5. Re: limits of containers (maxHeight=10000)
                  Flex harUI Adobe Employee

                  Post the smallest test case that reproduces your problem.

                  • 6. Re: limits of containers (maxHeight=10000)
                    Sainath.B Level 1

                    Hello there,

                     

                    Sorry should have been more clear : Please refer the code snippet that ne_polle posted above after changing Canvas's maxHeight to "20000". You said "You will need to modify the skin for at least the Box."  We could do this in Flex 4 and it works but how exactly do you mean to skin the Box in Flex 3??

                     

                    Sorry but my Eng is poor.

                     

                    Thanks in anticipation of a solution

                    • 7. Re: limits of containers (maxHeight=10000)
                      Flex harUI Adobe Employee

                      You said you are using Flex 3.  Please provide a small case that uses Flex 3.  The test case posted is using s:Application and is therefore tied to Flex 4.

                      • 8. Re: limits of containers (maxHeight=10000)
                        ne_polle Level 1

                        In my case I could solve my problem, by using the graphics drawing option.

                        I don't know if this is the best choice, but it works well.

                         

                        <?xml version="1.0" encoding="utf-8"?>

                        <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                                                         xmlns:s="library://ns.adobe.com/flex/spark"

                                                         xmlns:mx="library://ns.adobe.com/flex/mx"

                                                         minWidth="955" minHeight="600"

                                                         maxHeight="20000" initialize="init()"

                                                         >

                          <fx:Script>

                                            <![CDATA[

                                                      private function init():void {

                                                                box.clipContent = false;

                                                                box.graphics.clear();

                                                                box.graphics.beginFill(0x0000ff);

                                                                box.graphics.drawRect(0,0, 100, 20000);

                                                                box.graphics.endFill();

                                                      }

                                            ]]>

                          </fx:Script>

                         

                                  <mx:Canvas id="container1" x="200" y="300" width="1000" height="500" backgroundColor="0x009999"  maxHeight="20000">

                         

                                            <mx:Box id="box" width="100" height="20000" x="100" y="100>

                         

                          </mx:Box>

                          </mx:Canvas>

                        </s:Application>

                         

                        To the discussion of Flex harUI and Sainath.B:

                        I don't get eather the meanning of the advice to change something in the skin of the mx:Box.

                        How could I change the skin?

                        What do you mean with the keyword "skin" exactly?

                        • 9. Re: limits of containers (maxHeight=10000)
                          Sainath.B Level 1

                          Apologies for the mix up, I am using Flex 4 application but MX components only. Following is a sample code for your reference

                           

                          <?xml version="1.0" encoding="utf-8"?>

                          <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

                                               xmlns:s="library://ns.adobe.com/flex/spark"

                                               xmlns:mx="library://ns.adobe.com/flex/mx">

                               

                                <mx:Canvas id="container1" width="1000" height="500" backgroundColor="0x009999"  maxHeight="20000" maxWidth="20000">

                                      <mx:Box id="box" width="20000" height="20000" backgroundColor="0x00ff00" maxHeight="20000" maxWidth="20000"/>

                                </mx:Canvas>

                               

                          </s:Application>

                           

                          The problem is we cannot change the MX components to Spark component. And we can't use the above solution provided by ne_polle in our case. Thanks ne_polle anyways for sharing the solution.

                          • 10. Re: limits of containers (maxHeight=10000)
                            Flex harUI Adobe Employee

                            If you are using the Spark theme, then you need to alter the skins as the internal pieces have maxHeights as well.