New UI element does not 'fill' correctly

I have a hard time with the addition of a new element in the user interface while making it 'fill' correctly with current elements.

Let's say I have a container that is 500px. The container has 2 buttons set to fill, so that they resume 250px each and are very much same.

When I add another button in this container, I expect each button to 500px/3 or 166.667px now since all 3 buttons can fit into the container of 500px evenly.

This isn't the case, and instead of it, the les deux two buttons which themselves were originally only shrink very little, making it the third new tiny button. Basically, it is not yet.

No idea why this is happening?

I am SEO example of an interface user changed from David Torno (dynamically add and remove ScriptUI elements ) to illustrate this, as my current project is too large to post.

    function SCRIPTNAME(thisObj){  
          function SCRIPTNAME_buildUI(thisObj){  
              var pal = (thisObj instanceof Panel) ? thisObj : new Window("palette", "SCRIPTNAME", undefined, {resizeable:true});  
              if (pal != null){  
                    var res ="group {orientation:'column', alignment:['fill','fill'], alignChildren:['fill','fill'],\
                              group1: Group{orientation:'row', alignment:['fill','top'], alignChildren:['fill','top'],\
                                  addButton: Button{text:'ADD'},\
                                  removeButton: Button{text:'REMOVE'},\
                              },\
                              group2: Group{orientation:'row', alignment:['fill','fill'], alignChildren:['fill','fill'],\
                              },\
                    }";
  
  
                    pal.grp = pal.add(res);  
  
  
                    ///CONTROL VARIABLES  
                    var group1 = pal.grp.group1;  
                    var addButton = group1.addButton;  
                    var removeButton = group1.removeButton;  
                    var group2 = pal.grp.group2;  
                     
                    ///ADD NEW CONTENT TO GROUP2  
                    addButton.onClick = function(){  
                        var g = group2.add('panel', undefined, "myPanel");    //Add a group  
                        g.orientation = "row";  
                        g.add('button', undefined, "btn1");    //Add a button to that group  
                        g.add('button', undefined, "btn2");    //Add another button to that group  
                        updateUILayout(group2);    //Update UI  
                    }  
               
                    ///REMOVE CONTENT FROM GROUP2  
                    removeButton.onClick = function(){  
                        var kids = group2.children;  
                        var numKids = kids.length;  
                        if(numKids > 0){    //Verify that at least one child exists  
                              group2.remove(kids[numKids-1]);    //Remove last child in the container  
                        }  
                        updateUILayout(group2);    //Update UI  
                    }  
                     
                    ///UPDATE UI EASILY TO REFLECT ADD/REMOVE CHANGES  
                    function updateUILayout(container){  
                        container.layout.layout(true);    //Update the container  
                        pal.layout.layout(true);    //Then update the main UI layout  
                    }  
              }  
  
  
              pal.layout.layout(true);  
              pal.grp.minimumSize = pal.grp.size;  
              pal.layout.resize();  
              pal.onResizing = pal.onResize = function () {this.layout.resize();}  
                     
              return pal;  
          }  
           
          var SCRIPTNAMEPal = SCRIPTNAME_buildUI(thisObj);  
          if (SCRIPTNAMEPal != null){  
              if (SCRIPTNAMEPal instanceof Window){  
                    SCRIPTNAMEPal.center();  
                    SCRIPTNAMEPal.show();  
              }  
          }  
    }  
  
  
    SCRIPTNAME(this);  

ui-responsive-problem.jpg

When to do this way, the UI has how I expect and resizing evenly to add items. What becomes interesting, is that if you change line 26 to remove the Panel. (Replace the line var g = group 2, so let's just add buttons directly in Group 2 rather than add a new Board every time). Now, if you add buttons directly to the group, the buttons not resize uniformly more differently than when they are added to the Panel.

Any help would be appreciated!

If the buttons or groups are added as left or right alignment, it seems to work perfectly. Filling seems to cause the problem. I tried to resize the window manually to the smallest width and it will actually bring the buttons a bit back to normal, it seems while keeping the job of filling.

If you change the alignment or alignChildren for the container property:

container.alignment = ['left', 'fill'];

in the updateUILayout function, it will make the buttons display correctly. Simply not filling.

I even tried to change the alignment of the button in the updateUILayout function and only left and right works. Filling is ignored or just simply not correctly calculated maybe?

function updateUILayout(container){
    container.layout.layout(true);    //Update the container
    var kids = container.children;
    for(var k=0; k

I guess maybe it's a bug with the automatic layout manager and the parameter 'filler '.

Tags: After Effects

Similar Questions

  • New Firefox Sync does not work correctly. Bookmark cannot be deleted. Tabs are not displayed on the desktop.

    I have two problems with the synchronization again. The first problem is that none of my bookmarks or tabs of my office are appearing on my Android phone or work phone reverse on the desktop.
    The second problem is I'm trying to synchronize my favorites of the beta version of Android FF for the non - Beta Android FF that worked well until I corrected to remove several bookmarks I have anymore. I want to remove them, but I can remove them only on the beta version and then when I go to the regular version none of the changes have been synchronized. If I try to remove them from the normal version nothing happens at all.

    One thing to check is the android device and new update of office are on the same synchronization. To check on Android is this (not recommended) Firefox Sync account

    The other thing to check is if the tabs and bookmarks synchronization options are on for both devices in the page manage account.

    Is this the case?

  • Firefox seems to have recently developed seemingly random usually do not remember bookmarks, particularly when the pc does not stop correctly. Thank you

    Firefox seems to have recently developed seemingly random usually do not remember bookmarks, particularly when the pc does not stop correctly. Thank you

    If Firefox detects that the places.sqlite database is corrupted then Firefox can create a new database file and import bookmarks from a JSON backup that does not contain the most recent bookmarks (a new JSON backup is created when you run Firefox for the first time on a day), then you may lose the bookmarks in such a case.

    You can check for problems with the database places.sqlite file in the Firefox profile folder.

  • Games running in lower resolution on the desktop resolution does not fill the screen

    I have a laptop HP ENVY 17 TS with NVIDIA GT 740 M and Intel 4600HD graphics drivers and running Windows 7. Whenever I want to change the resolution in games at a lower resolution on the desktop resolution, the game shrinks to its view, leaving the couple of inches black bars on the edges. For example, if my the desktop resolution is 1920 x 1080 and I want to start a game in 1600 x 900, the game does not fill the screen, instead, it leaves an amount of empty space on the edges of the screen.

    In order to solve this problem, I tried the following steps:

    I first tried to locate the view tab in the NVIDIA Control Panel in order to define the scale/stretch in "Full screen", but my version of NVIDIA CP isn't the view tab (my NVIDIA drivers are the latest version).

    Then I discovered that I should do this in the Intel HD Graphics Control Panel. My Intel HD Graphics CP has an option named "Calibration" under display > display settings and it doesn't show the option to retain display scaling that is checked by default and does not change. Also, after searching the Internet I saw that some people suggested entering the 'advanced settings' and try to make changes. When I try to enter advanced settings, under view, it says 'this screen does not support advanced settings'.

    After trying without success, I tried the update driver Intel via their website, hoping that it can fix the problem. I ran the small Intel application on their Web site that identifies my chipset and offers me the latest driver for this chipset. Web site told me that the driver is installed on my computer is 10.18.10.3304, and there is an update for what is 15.33.18.64.3496 (or 10.18.10.3496). So I downloaded the file, but when I tried to run, it gave me this error message: "the drivre being installed is not validated for this computer. You can get the correct driver from the manufacturer of the computer. Setup will now exit. "that makes no sense.

    After trying the above steps, I'm not able to solve the problem, and I need help from someone who really knows how to solve this problem.

    Thank you.

    Solution (I hope)

    1. choose the properties of the graphic (logo Intel) option when you right click on the desktop

    2. go in view

    3. go through the resolutions on the 'Resolution' and change to this resolution (do not click Apply)

    4. for everyone to go to 'Scaling' at the bottom of the screen and change it to scale full screen (do not click Apply)

    5. Repeat until you get back to the higher resolution (that won't let you change the scale).

    6. quickly choose a few resolutions from the drop-down menu to make sure that they have changed their scale.

    I had a problem with some resoultions changing the way they were, but which should solve most of the problems.

  • Portable flow does not fill the TV screen.

    When I connect my laptop Lenovo to my Sansung HDTV with a HDMI cable to watch football, image does not fill the full screen. ANC, someone tell me how to solve this - in terms laymans!

    Hi Stevie H,

    This would happen if the screen resolution is not set correctly on the computer.

    I suggest that you set the resolution of the screen on the computer and check if it helps.

    (a) open settings display by clicking the Start button, clicking Control Panel, appearance and personalization, customization, and then clicking display settings.

    (b) pursuant to the resolution, move the slider to the desired resolution, then click apply.

    HDTV: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/HDTV-frequently-asked-questions

    Connect your computer to a TV

    http://Windows.Microsoft.com/en-us/Windows-Vista/connect-your-computer-to-a-TV

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • spell check does not work correctly. It highlights each word

    my spell checker does not work correctly. When I send a message it highlightes, virtually every word and all are spelled corectly - help please

    You use Outlook Express when you see this? Office Word 2007 or 2010 is installed?

    You no longer have the correction spell checking capabilities in some languages in Outlook Express 6.0 after you install the Microsoft Office 2007 or Office 2010 system
    http://support.Microsoft.com/kb/932974

    Outlook Express cannot use the check spelling of MS Word in Office 2007 or newer. A free spell-checking the download is the easiest way to get around this.

    Vampirefo spell check.

    Download from Major Geeks:
    http://www.MajorGeeks.com/download.php?Det=2952

    Or upload it to SnapFile:
    http://www.SnapFiles.com/get/spelloe.html

    You wanted TinySpell or. (Check spelling while typing).

    Download it here:
    http://www.tinyspell.M6.NET/

    Australian English spell checking
    (Also suitable for other English speaking countries).
    http://www.justlocal.com.au/clients/oespellcheck/

    If you have an earlier version of Office, see this:
    http://www.Outlook-tips.NET/archives/2006/20061228.htm

  • My screen does not work correctly.

    My screen does not work correctly.  Yesterday, it was OK, but when I turned on it today it has a white bar on the side left which effectively blocks on the right side of the screen.  When a dialog box is moved to the left, it goes behind the empty bar and is obscured.  How can I rectify this?

    I have a monitor of edge 10.

    Try your monitor on another computer, or borrow a monitor to try on your computer.  That should narrow down where the problem is quite quickly.

    "LiamMc Kinney" has written in the new message: * e-mail address is removed from the privacy... *

    My screen does not work correctly.  Yesterday, it was OK, but when I turned on it today it has a white bar on the side left which effectively blocks on the right side of the screen.  When a dialog box is moved to the left, it goes behind the empty bar and is obscured.  How can I rectify this?

    I have a monitor of edge 10.

    http://answers.Microsoft.com/message/06f039dc-a1fb-4466-8ee9-aa276bb48ecb
    Meta tags: hardware; windows_vista

    Monday 2 April 2012 19:59:11 + 0000: CreateMessage LiamMc Kinney

  • User profile does not load correctly, the user could not be connected.

    I tried to login to my account to administrator with my correct password and it says "user profile can be connected, user profile does not load correctly ' or something to that effect. Even when I login as a guest and enter my admin password on the user accounts settings and click ok, it won't let me access or modify accounts. Please help me, I am not able to access one of my documents or pictures of my guest account.

    ·                         Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If the above does not work:

    http://windowshelp.Microsoft.com/Windows/en-AU/help/769495bf-035C-4764-A538-c9b05c22001e1033.mspx

    Difficulty of a corrupted user profile

    After creating the profile, you can copy the files from the existing profile. You must have at least three user accounts on the computer to perform these operations, including the new account that you created.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://support.Microsoft.com/kb/947242

    A temporary profile is loaded after you connect to a Windows Vista-based system

    See you soon.

    Mick Murphy - Microsoft partner

  • 6 Lightroom does not start correctly

    LIghtroom 6a fonctionnee om my 10 (x 64) of Windows without problem for 6 months. After the installation of a slide (CyberViewX) scanner and a regular update to Win 10 that occurred automatically when closing down the computer, the 6 Lightroom does not start correctly since I restarted the computer. I uninstalled the scanner CyberViewX program and rebooted the computer again. The only thing that happens when you try to open LR6 is a message that an error has occurred when opening the catalog. I do not have a backup catalog, and there is a button where I can choose a different catalog. When you press this button I find the backup catalog, but when I chose this catalogue I go back to the original message and the backup catalog was obviously not chosen. There is a button to create a new catalog as well and when I press this button I just in my photo folder and there seems to be no way to create a catalog or open LR6. This form of dialogue is obviously not working correctly.

    There was a lock by the catalog file, and I deleted this file. I also tried all the tricks LR running as an administrator and assign full privileges for all users of my photo file.

    The only thing I have not tried is to uninstall and reinstall the whole LR6, but I have a lot of photos and work so I hesitate to do this without knowing that it is necessary and if sure that I can get everything back in order with the old catalog and all restored. Anyway to fix corrupted with the installation DVD files?

    What should do? Help!

    Hi bjomb,

    You suggest to choose the option to create a catalog and give it the name once you get the pictures folder window, and then choose create.

    This would create a new catalog.

    check if it opens the new catalog, and it passes under the background processes in the Task Manager.

    If it does not, then you need to reinstall Lightroom program and it would not affect your changes as changes are stored in the catalogues and catalogues remain it is same when the resettlement.

    Kind regards

    Claes

  • How can I load my CS5 on my new laptop that does not have a hard drive?

    How can I load my CS5 on my new laptop that does not have a hard drive?

    Downloads available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • D810 new camera appearing does not pix in raw files into components 11

    D810 new camera appearing does not pix in raw files into 11 elements and lightroom 4

    8.7 DNGC can be found here: http://www.adobe.com/downloads/updates/

    You can buy upgrades for LR or PES, here:

    http://www.Adobe.com/products/catalog/software._sl_id-contentfilter_sl_catalog_sl_software _sl_mostpopular.html

  • How can I load eLearning Suite 2.5 on my new computer that does not have a hard drive?

    How can I load eLearning Suite 2.5 that I bought a year ago on my new computer that does not have a hard drive?

    If you follow the 7 steps (list here, http://prodesigntools.com/adobe-cs6-direct-download-links.html) you can dl a free trial here: http://prodesigntools.com/adobe-captivate-5-and-elearning-suite-2-now-shipping.html/commen t-page 1

    and activate it with your serial number.

    If you have a problem dl'g, you don't follow all 7 steps.  the most common mistake is not meticulously follow the steps 1, 2, and/or 3 (which adds a cookie to your system, allowing you to download the correct version of the adobe.com site).

  • RT News showing extension does not then update to version 40.

    I have re-installed the latest version and new RT extension does NOT appear where the other extensions (for example, ABP) appear.
    Is returned to the 39.0.3 Version and it is very good.
    Of course, there is a bug that needs fixing.

    An updated version of the - https://addons.mozilla.org/en-US/firefox/addon/rt-news/ - has been released and now works in Firefox 40.0.3.

  • My phone does not work correctly

    My phone Bluetooth, Wi - Fi and GPS connection does not work correctly. Bluetooth and wifi have the low range of connection and can barely connect what either. GPS won't work at all, so I can't use it for direction more.

    Take it to an Apple store for diagnosis.

  • Yahoo mail does not load correctly

    Yahoo mail does not appear correctly. Does not add, or graphics. I uninstalled Firefox and reinstalled the latest version and it did not help. I started Firefox Add - ons disabled and this did not help. Yahoo email is the only site to be on. Gmail opens fine with Firefox and yahoo mail opens fine in Internet Explorer. It started tonight and nothing on my computer has been changed before you start.

    Nothing of what you have suggested will be / will work. I tried all your suggestions and much more, before you find what is the problem. Yahoo mail not properly opens with Firefox, if you try to open it with Yahoo messenger open. If anyone runs into this problem, close on yahoo Messenger and open your mail with Firefox alone.

Maybe you are looking for

  • How can I set up to export excel header lines?

    I used Vi Logger in the past.  Now, I have SignalExpress, but I can't find the way to configure the row header in Excel when I export experimental runs to this format, as it is possible in ViLogger I'd appreciate some tips Alberto

  • The construction of a Phase Lock Loop of individual circuits.

    I am trying to build a PLL THAT work based on the 4046. The circuit I use has a low bandwidth and works at a low frequency with a duty cycle of 50% constant (square wave) so I'll use the low end Phase detector noise the 4046. I have the app 'notes' T

  • Change the path to the updates from microsoft updates vs. windows

    Fully updated, xp pro, ie8 When you click Start, all programs, windows update, go to the updates of microsoft with the compatibility view which connection online for microsoft updates gets updates microsoft without compatibility view can I change the

  • Impossible to my Xperia P ICS (4.0)

    Hello I have bought renectly a P Xperia which salis 2.3.7 (Gingerbread). When I check on my phone for new updates is said that "my phone is updated. I tried to update qith PC Companion AND Service of update but I still get the same result: your phone

  • Wireless printer can not connect

    I just purchased a WRT160n V.3 and the new firmware I have a printer wireless Lexmark x 6570 for a reason any router will not let me connect to the printer called Lexmark and they said security was put on high heat, but I have a WRT54GS with the same