Setting ActualSize doesnt do anything

Hello everybody.
I have simple skin which is like this:
    <s:BorderContainer id="border" width="100%" minWidth="0">
        <s:DataGroup clipAndEnableScrolling="true" id="clip"
                     itemRenderer="spark.skins.spark.DefaultItemRenderer">
            <s:layout>
                <s:HorizontalLayout id="hl" gap="10" />
            </s:layout>
        </s:DataGroup>
    </s:BorderContainer>
A border and a group. Easy !
With a couple buttons on my main app I can control what's inside of my "clip"'s dataProvider.
What i would like to do is hiding elements of my group when there are more than a specific number (even if there is enough space). So in my components code, i wrote this:
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    super.updateDisplayList(unscaledWidth, unscaledHeight);
    if (clip.numElements > 3)
        clip.setActualSize(hl.getElementBounds(2).right, clip.height);
    else
        clip.setActualSize(clip.width, clip.height);
But the clip never gets truncated ! I can see all my items that i added to it.
It's only when i resize my whole component from the main app (thanks to a slider value), that the clip size gets updated. As soon as i add or remove something from it, its width return to the regular one.
What am i missing in the whole display process here ?
Thanks !

Hi,
For one thing since you are using the HorizontalLayout, calling setActualSize() on a visual element is getting trampled by the layouts own calculations. If you want widths and heights to stick when using these layouts you need to either set explicitWidth or width.
The method setLayoutBoundsSize() is actually somewhat of a proxy for setActualSize(). The differenece between the two is the first takes postLayoutTransform into account and then calls setActualSize().
The setActualSize() method does not set explicit widths or heights, that is why you can't get it to "stick". The layout just ends up using the preffered width and height again.
Mike
http://www.teotigraphix.com
http://blog.teotigraphix.com

Similar Messages

  • Apps Install Location Doesnt do anything?

    I had CS6 installed on my machine in the C drive (125GB SSD) This was done with the very first cloud installer.
    I uninstalled it as I have a new SSD that I want my apps to be installed on. I just want my OS on the C drive.
    I donwload the cloud manager software.
    Go to the preferences menu and find the following options:
    Apps: Install Location
    Files: Folder location
    Before I insatll any apps, I set both of these to point to my new SSD as that is the location I want to install apps in and files.
    I then click on Photoshop CC to install.
    I always installs on my C drive.
    Why? What is the point of a preference to install in a different location if it doesnt do anything?
    Has anyone managed to install Photoshop in any other drive than the C drive? If so How?
    You cant even choose where you want to install the Creative Clud app?

    Changing product installation location in CC App
    Launch CC app.
    Click on the Setting in the upper-right corner.
    Click Preferences-> App
    Click on Change and then navigate to your desired installation location and select the folder.
    Start the Install process.
    When you change it in preferences it get stored, Please confirm Preferences-App is showing the location you specified or not.
    Try re-launching your CC app again after changing the preferences.
    Regards,
    Ashutosh

  • My Center button on my Ipod 3rd generation is not working? What do i do it still goes up and down just doesnt select anything.

    My Center button on my Ipod 3rd generation is not working? What do i do it still goes up and down just doesnt select anything.

    What I had to was backup my device's data to either iCloud or iTunes. Once it was backed up I erased all of my settings as if my iPad just came out of the box. You set it up again and it will asked you to either start as new, back up from iTunes, or back up from ICloud. If you want to see if everything works you can set up as new, otherwise just pick the choice depending on where you backed up your information. Eventually it will restore all of your information and your iMessage and FaceTime should be working. It worked for me, if you'd like more/better instructions let me know!!

  • I cannot get iTunes to open or play on my macbook pro. When I click on the icon it doesnt do anything..I get the icon on the top of the screen but the library wont open or show me anything

    I cant get iTunes to open on my macbook pro, when I click on the icon it  shows the iTunes name on the top of the page but the library wont open , and when I click the tabs it doesnt do anything. What can I do? Its driving me insane!!
    HELP!!

    On the iTunes menu bar, click the Window tab. Is itunes selected?

  • Ordered my iphone 6 plus from atnt on september 29 when will it be ship to my house but it doesnt show anything on atnt order information! what should i do? please answer my question!

    ordered my iphone 6 plus from atnt on september 29 when will it be ship to my house but it doesnt show anything on atnt order information! what should i do?
    the truth is that i order my iphone 6 plus on september 26 from atnt store and on site but my credit card was declined
    so i tried it the next day but it works but from atnt site doesnt show anything(it only show my order on iphone 6 plus just like the last time)
    when will it say your order has been shipped?
    when will it be ship to my house?
    and also im going to use atnt next on iphone 6 plus
    please answer my question!

    This is a user to user technical support forum.  We can't possibly answer your question.

  • Ipod 4 is displaying blue frozen screen and black screen with apple logo. I try to turn power off but as soon as it goes out it automatically reboots. Plugged it into the usb port on my mac and it doesnt do anything. It doesnt appear in Itunes. Help?

    ipod 4 is displaying blue frozen screen and black screen with apple logo. I try to turn power off but as soon as it goes out it automatically reboots. Plugged it into the usb port on my mac and it doesnt do anything. It doesnt appear in Itunes. Help?

    Let the battery fully darain. After charging for an least an hour try a reset and restore. Use Recovery mode if necessary.
    If not successful, then time for an appointment at the Genius Bar of an Apple store.

  • Why can't I download OS X Mavericks? The download option is malfunctioning. I already checked that my mac version can have free upgrade. I click download, but it just doesnt do anything.

    Why can't I download OS X Mavericks? The download option is malfunctioning. I already checked that my mac version can have free upgrade. I click download, but it just doesnt do anything. I went to purchase tab, clicked "download" next to the app but still nothing happens. It's not internet problem because everything else on the app store works. The only thing not working is Mavericks downloading and I don't know why. Please help.

    To install Mavericks, you need one of these Macs:
    iMac (Mid-2007 or later)
    MacBook (13-inch Aluminum, Late 2008), (13-inch, Early 2009 or later)
    MacBook Pro (13-inch, Mid-2009 or later),
    MacBook Pro (15-inch or 17-inch, Mid/Late 2007 or later)
    MacBook Air (Late 2008 or later)
    Mac mini (Early 2009 or later)
    Mac Pro (Early 2008 or later)
    Xserve (Early 2009)
    Your Mac also needs:
    OS X Mountain Lion, Lion, or Snow Leopard v10.6.8 already installed
    2 GB or more of memory
    8 GB or more of available space
    Since Mavericks requires 8GB's or more of free disk space, control click the MacintoshHD icon on your desktop or open the Finder, right or control click startup disk in the Sidebar on the left then click Get Info.
    You'll see Available and Capacity. Make sure there's at least 15% available disk space.
    If installed, disable anti virus software before downloading Mavericks.

  • I locked my iphone and its telling me to connect to itunes and i did but it doesnt say anything about unlocking it. what do i do?

    locked my iphone and its telling me to connect to itunes and i did but it doesnt say anything about unlocking it. what do i do?

    http://support.apple.com/kb/ht1212

  • Ipod doesnt do anything

    my ipod wont turn on, it wont turn on when you plug it in to charge it, and it wont turn on when i plug it into my computer it doesnt do anything. anyone have any suggestions how what to do?

    Welcome to Apple Discussions!
    Does your iPod respond if you try to reset it?
    Resetting your iPod
    This may be an issue with your iPod's hard drive being bad, though. You may need to get it replaced.
    Have you seen this Apple Support article about it?
    iPod won't turn on
    Have you tried restoring your iPod yet? I know you can't do it now (since it won't respond when connected), but have you tried the other Five R's, so you can try a restore on your iPod?
    The Five R's
    I hope this helps, post back if it does,
    -Kylene

  • My friend bought a mac book Argentina air (11") 2013 when you turn on the computer its doesnt do anything

    hi my name is luciana, i send this email, because my frien ho   live in argentina he bought a mack book air 11' 2013 computer,
    and he have a problem when he tourn on the computer  its doesnt do anything/. i want to know how we can fix  because he live in argentina.
    please reply to [email protected]

    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    For more on this:
    http://support.apple.com/kb/TS1365

  • TS3297 Purchased Beck's new album Morning Phase. Track 10 'Phase' wont download. Keep getting message check available downloads but when I click on that it doesnt do anything?

    Purchased Beck's new album Morning Phase.
    Track 10 'Phase' wont download. Ive tried restarting, left it over night then tried again, etc. Say's the file is corrupted.
    Keep getting message "Check available downloads" but when I click on that it doesnt do anything? All other tracks are fine.
    Any ideas?
    Thanks
    Lee

    Hello, lee19760_0. 
    Thank you for visiting Apple Support Communities.
    I would delete the media that is giving you an issue and download it again by accessing your previous purchase.  The articles below will walk you through that process.
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App
    http://support.apple.com/kb/HT5772
    Download past purchases
    http://support.apple.com/kb/ht2519
    Cheers,
    Jason H.

  • TS3212 i am trying to buy a song on itunes and every time i try this always pops up "payment information required tap to continue sign in" and the payment info shows up and them doesnt do anything then i try again and the same thing happens!!! What do i d

    Please answer with in the next 5 minutes
    Thank You!!

    sorry to bother you.. but did you get any tips or answers on how to fix the issue you had in relation to your question.. by any chance.. (TS3212 Re: i am trying to buy a song on itunes and every time i try this always pops up "payment information required tap to continue sign in" and the payment info shows up and them doesnt do anything then i try again and the same thing happens!!! What do i do??)
    Sep 13, 2012 5:17 PM

  • My iphone 4 wont download apps, says my storage is full, but when i delete photos/apps, its still says my storage is full. whenever i try to backup my phone, it doesnt work. anything i can do?

    my iphone 4 wont download apps, says my storage is full, but when i delete photos/apps, its still says my storage is full. whenever i try to backup my phone, it doesnt work. anything i can do?

    Go to Settings - General - Usage and see which apps are taking up a lot of space.
    In my experience, if you haven't cleaned out your Messages that is where a lot of space is consumed.

  • How do i start my amds? It says its stopped but when i press start it doesnt do anything and ive pressed start a million times. Sometimes it starts sometimes it doesnt. Ive tried everything. any ideas?

    It says its stopped but when i press start it doesnt do anything and ive pressed start a million times. Sometimes it starts sometimes it doesnt. Ive tried everything. any ideas?

    Perhaps try the following document. (It's a better bet with a 1067 error message when trying to start AMDS, but I think it's worth a check.)
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • My itunes doesnt show anything it has been hapening for a week already and ive done everything on the itunes support even reinstalling it please help

    my itunes stores doesnt show anything and ive tryed everything on the apple support page even reinstalling it please help

    Microsoft Windows Vista Home Premium Edition Service Pack 2 (Build 6002) HP-Pavilion RK573AA-ABA a1710n iTunes 10.4.0.80 QuickTime 7.7 FairPlay 1.12.20 Apple Application Support 2.0.1 iPod Updater Library 10.0d2 CD Driver 2.2.0.1 CD Driver DLL 2.1.1.1 Apple Mobile Device 3.4.1.2 Apple Mobile Device Driver 1.57.0.0 Bonjour 3.0.0.2 (333.2) Gracenote SDK 1.9.1.485 Gracenote MusicID 1.9.1.102 Gracenote Submit 1.9.1.133 Gracenote DSP 1.9.1.43 iTunes Serial Number 002DB3D803DAE110 Current user is not an administrator. The current local date and time is 2011-08-12 01:17:45. iTunes is not running in safe mode. WebKit accelerated compositing is enabled. HDCP is not supported. Core Media is supported. Video Display Information NVIDIA, NVIDIA GeForce 6150 LE  **** External Plug-ins Information **** No external plug-ins installed. iPodService 10.4.0.80 is currently running. iTunesHelper 10.4.0.80 is currently running. Apple Mobile Device service 3.3.0.0 is currently running. **** Network Connectivity Tests **** Network Adapter Information Adapter Name: {56717430-C007-489A-97FF-BD28BDD088D5} Description: NVIDIA nForce 10/100/1000 Mbps Ethernet IP Address: 10.0.0.4 Subnet Mask: 255.255.255.0 Default Gateway: 10.0.0.1 DHCP Enabled: Yes DHCP Server: 10.0.0.1 Lease Obtained: Thu Aug 11 17:07:44 2011 Lease Expires: Fri Aug 12 17:07:44 2011 DNS Servers: 10.0.0.1 Active Connection: LAN Connection Connected: Yes Online: Yes Using Modem: No Using LAN: Yes Using Proxy: No SSL 3.0 Support: Enabled TLS 1.0 Support: Enabled Firewall Information Windows Firewall is on. iTunes is enabled in Windows Firewall. Connection attempt to Apple web site was successful. Connection attempt to browsing iTunes Store was successful. Connection attempt to purchasing from iTunes Store was successful. Connection attempt to iPhone activation server was successful. Connection attempt to firmware update server was unsuccessful. The network connection timed out. Connection attempt to Gracenote server was successful. Last successful iTunes Store access was 2011-08-11 18:38:20.

Maybe you are looking for

  • Help needed with iMessage on multiple devices on one iTunes account

    Hi, please can someone help.  I have an iPhone 4S and my wife has an iPhone 4, we are using iMessage with one Apple ID with no problems (I presume as the messages are sent to the phone number), however I have purchased both my daughters an iPod Touch

  • Elements 6 won't install

    Elements 6 will not install. I get a  white box after entering the serial #. HELP. Using XP no other Adobe software on the PC.

  • Installer problems on Windows 8

    I've been trying for hours to install Premiere Elements 11 on my new Samsung Ativ i5 smart PC. It runs a 64-bit WIndows 8 platform. Have tried downloading and installing product and it extracts OK but when the installer comes up it has all the instal

  • Conversion exit for BANKN

    Hi all , We have created a conversion exit for BANKN (LFBK-BANKN) field to mask it ; This field is getting masked in most of hthe reports execpt few . When i checked the issue , CDPOS table doesnt contain this field against the change number (say of

  • Netbeans javascript library  integration in Dreamweaver

    I have configured my site so that it is both a Dreamweaver site and a Netbeans 7.3 HTML project.  This is working fine. I can edit and save in both locations.   However, I am confused about the Netbeans Library integrations into Dreamweaver. How is t