[JS] Hide extra space in the dynamic Script UI

When the hide/show sections, I get more space that I don't want. I was not able to understand how to remove extra space.

There is a post at http://forums.adobe.com/message/3708111 where I have adapted the following simple example. When the section that alternate you power is hidden, you will see there is more space between the text of the first and the second static. There should be less space (as seen between the second and third static text). Any ideas on how to avoid the extra space?

Thanks in advance.

Dan

var NULL_SIZE = [0,0],
     MAX_SIZE = [1000,1000];

var u,
     w = new Window('dialog', 'test'),
     p = w.add('panel'),
     s1 = p.add('statictext', u, "This is a static text"),
     // collapsible group
     g = p.add('group'),
     e = g.add('edittext', u, "Edit your text..."),
     r = g.add('checkbox', u, "Blablablabla"),
     // ---
     s2 = p.add('statictext', u, "This is more static text"),
     s3 = p.add('statictext', u, "This is another static text"),
     b = w.add('button', u, 'Toggle');

g.orientation = 'column';

// Initial state : hidden
// ---
g.visible = false;
g.maximumSize = NULL_SIZE;

// Toggles container's visibility
// ---
b.onClick = function()
{
     g.maximumSize = (g.visible ^=1) ? MAX_SIZE : NULL_SIZE;
     w.layout.layout(true);
};

w.show();

Hi Dan,.

Maybe you should reset the spacing of g1and work with margins of the subgroups:

// [...]

p.spacing = 10;
g1.spacing = 0; // no spacing

var GP_MARGINS = [0,4,0,4]; // left, top, right, bottom

subgroup1.margins = GP_MARGINS;
subgroup2.margins = GP_MARGINS;
subgroup3.margins = GP_MARGINS;

// Initial state : hidden
// ---
subgroup2.visible = false;
subgroup2.maximumSize = NULL_SIZE;

// Toggles container's visibility
// ---
b.onClick = function()
{
     subgroup2.maximumSize = (subgroup2.visible ^=1) ? MAX_SIZE : NULL_SIZE;
     w.layout.layout(true);
};

w.show();

@+

Marc

Tags: InDesign

Similar Questions

  • Extra space at the bottom

    It's probably something simple, but I can't. Why is there all this extra space at the bottom of the page?

    http://www.aptcoweb.com/dev/EXCBB/

    HI -.

    You have an attribute with a value of 290px min-height in Content1.css (line 129)

    .gridContainer div {

    min-height: 290px;

    }

  • delete extra spaces in the column of the table

    How can Hi I remove extra spaces in the column of the table for example if the table column is store as "ÄAAAAA" how to remove this extra space

    This is the column I have what it takes to remove extra spaces
    select SUBTYPES  from tablesubtype;
    am in
    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE Production 11.2.0.3.0
    AMT for Solaris: 11.2.0.3.0 - Production Version
    NLSRTL Version 11.2.0.3.0 - Production

    Published by: adf0994 on 03/12/2012 11:30

    Published by: adf0994 on 03/12/2012 11:42
    UPDATE tablesubtype
       SET SUBTYPES  = TRIM (SUBTYPES);
    

    RTRIM do it alone will not be enough coz it takes away only right spaces and NOT left those.
    I guess in your case do a PLATE will be more advantageous to be safe and avoid left spaces in the future.

    For the intermediate spaces... try this.

    UPDATE tablesubtype
       SET SUBTYPES  = REGEXP_REPLACE (SUBTYPES, ' ', '');
    

    Hope this helps,
    Vanessa B.

    Published by: Vanessa B December 3, 2012 14:33
    -added regexp

  • Extra space after the quotation mark open

    I write fiction. I need to be able to put the dialogue in quotation marks. My problem is that when I ask speech recognition for 'Open-quote' and then start the dialogue, I get an extra space. Like this: "come with me, Jim.

    Does anyone have a solution?

    Hi DennisFoley

    My apologies for not getting back to you sooner, actually I'm surprised that no one else has offered suggestions.

    I've personally never used speech recognition, so I have a question.  I know it's maybe not the right way to "solve" the problem, but you can do it?  When you say quote open or open Double Quote, can you tell us immediately Backspace?

    If I find any useful information, I'll post it here.

    Thank you

    Ken
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Get the extra space in the table

    I use af:table for whom

    1. I use the styleclass AFStretchWidth and I put the width to 100%

    2. I'm defining the width of the columns in % (sum of the width of all columns is 100%)

    3. about the table with af:panelCollection and using AFStretchWidth styleclass.

    4. about the table and af: panelCollection with af:panelGrouplayout, the line is vertical and the styleClass is AFStretchWidth.

    And I use the same table 4 cases but I get the extra space that in rare cases. Am I missing something?

    Set columnStretching = "last" or one of the columns will disable the percentage of column widths, this means that if you set the columnStretching = "last" column width table and set = "15%" when running, the column width will be '15px '. If you want to set the column width by the percentage of the columnStretching of the table must on "multiple" as you did.

    So, if you want to set columnStretching = 'last' table, you must set the column width of pixels (width = "120").

    Your page looks ok, you set columnStretching = "multiple" and you set the columns width in percentage but try to remove the width of the table = '100% ' and test again.

  • Windows 8 is not recognizing the extra space in the hard disk resized

    I was out of the room on the virtual drive of Windows 8 in VMWare Fusion 5.02. I increased the size of the disk in the settings, but when I run Windows, he does not see the extra space. Obviously, I have to leave something out of the process. If you can help me, please let me know what I am doing wrong. Thank you!

    Have you ever increase the NTFS of Windows partition in disk management or you do not see the additional disk space

    André

  • space in the dynamic statement

    How can I manage the space in a dynamic statement similar to the following?

    Select empno, emp_fname | ' ' || emp_lname as fullname, depno from emp;

    immediate 'select empno, | ? || "depno from emp".

    Thank you very much.

    Munshar

    As I understand it, the question is really--how do you manage quotation marks in dynamic sql statements.
    What is between these quotes is not relevant.

    With quotes from 2 people is one of the options:

      1* select 1,2||' '||3 from dual
    SQL> /
    
             1 2||
    ---------- ---
             1 2 3
    
      1  declare
      2   v1 number;
      3   v2 varchar2(10);
      4  begin
      5   execute immediate 'select 1,2||'' ''||3 from dual' into v1, v2;
      6* end;
    SQL> /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    You can also q quote mechanism on 10 g +:
    declare
    number of v1;
    VARCHAR2 (10) v2;
    Start
    run immediately q'[select 1,2 |] » '|| 3 double]' in v1, v2;
    end;

    Published by: DomBrooks on November 1, 2010 16:24
    For example modified to use the concatenation.

  • DW still adding extra spaces to the code

    I feel always the question of the DW by inserting extra spaces between each of my lines of code when I get the file from the server.  I put the file with a normal spacing, then I get the same file and it comes with extra spaces.  It's driving me crazy!  I have to re - format each page whenever I have catch the server!  It happens with DW CS3, and a friend told this to happen with DW CS4.  Is there a setting that controls DW of NO change or re-formatting of the files when I get them from the server?  Help, please!

    Try:

    http://www.techiebubble.com/software/how-to-remove-the-extra-spaces-that-appear-in-dreamwe aver.

  • How can I get rid of extra space in the section toolbar?

    There is an empty space between the tabs and the Navigation toolbar. It's the same height that other toolbars and is very annoying. How can I get rid of this space?

    I tried to paste in a screenshot to show what I mean, but he does not accept this form.

    Sorry thought you had placed them both on the same toolbar.
    What you seem to have a bookmarks without all the bookmarks toolbar.

    Make sure you have this check box from the toolbar of bookmarks
    View > toolbars

    Use "Ctrl + B" to bring up the bookmarks in the sidebar.
    You should have three records major 'personal bar' "Bookmarks Menu" and "Unsorted Bookmarks".

    If you have no bookmarks or folders in the 'personal bar' which could be a reason it becomes empty, the other, and the only other one I think is currently possible with Firefox itself is that you have not the wording "Bookmarks toolbar items" in the line when to customize, look for an item marked "Bookmarks" - there are two of these elements you don't want White Star on a black background and menu drop-down, you want the one with a blue symbol on the right side - do - drag it to the bookmarks toolbar, be careful when you sliding it might fall into the wrong toolbar.

    If it does not use the "Restore Default Set" and then you will have to re - customize your toolbars (but you placed a photo here that you could work towards).

    See the image at http://kb.mozillazine.org/Toolbar_customization_-_Firefox
    to then customize with "Bookmarks Toolbar Items" display of the toolbar.]

    My own customizations seen in this image

    are described in the following text

    You can make Firefox 4.0.1 and Firefox 5.0 resemble Firefox 3.6.17, see numbered 1 to 10 in the next topic difficulty Firefox 4.0 UI toolbar, problems (make Firefox 4.0 look like 3.6)

    most of the major changes style as color borders around the tabs for the State and the bookmarks with folders blue and red bar favorites are in the positions of style # 41-45 (46 if you have several profiles).

  • Extra space above the footer / and or / bottom footer that I can´t to get rid of.

    Hello, I am building a Web site that I have to achieve by Monday, but I seem to have a problem with Adobe Muse.

    extra white space appears when I saw on the browser, it does not appear on the design itself. theres no rectangles hidden, text or anything in this space

    It just seems. I once managed to get rid of by checking the sticky foot, but then the white space appeared under my foot.

    Please help me, because I'm really desperate and Don t know what else to do.

    He is a legend of design.

    Captura de pantalla 2015-04-09 a la(s) 17.39.34.png

    He is a legend of the white space that appears above my footer and below my composition.

    Captura de pantalla 2015-04-09 a la(s) 17.41.07.png

    He is a legend in the page properties:

    Captura de pantalla 2015-04-09 a la(s) 17.42.17.png

    and that's what happens when I uncheck the footpage post-its:

    Captura de pantalla 2015-04-09 a la(s) 17.43.38.png

    white space goes above the footer, under the foot. Image preview in Google Chrome, im not sure if this is affected or not, and if yes, how I saw in another browser?

    I'll be really grateful for your help.

    Jose Fernandez Palou.

    have you tried turning off "sticky footer" / ' pie of pagina adhesivo "?

  • #... expression # leaves extra space for the first #.

    Hello

    I run CF 9.01 and have a nasty white space problem:

    Fill out a form like this field:

    ---

    ... value = "#application.utils.FormatTS (now ()) ' # '..."

    ---

    This leaves behind in the generated source code the following:

    ----

    " value= ' 2011-01-22 03:34:03"

    ---

    Later, the empty space causes a problem. I saw this bug throughout all versions of CF. One can avoid this problem in all cases where we can concatenate strings as in "some test" & application.utils.FormatTS ()... This is not geneate empty space.

    IsDate (CF) returns if the space is there... LSIsDate () returns YES... in my humble OPINION inconsistent behavior.

    BTW: The FormatTS () function generates NO space left. Is that the way that CF generates code

    BTW: I know that I can get rid of the space with trim()... However, it's a mess to be forced to do so in all THE processes of these constructions...

    No known cure for this? Or any reason WHY CF like this? How can I seduce do not generate the code of juice?

    Thank you

    Martin

    BTW: The FormatTS () function does NOT generate the main

    space. Is that the way that CF generates code

    Are you positive? It's certainly the most likely cause. Check the cffunction and make sure you have set output = "false".

  • Extra space above the header in Firefox

    Hey everyone, I'm new to Dreamweaver and I'm having a little trouble with my site.  In "Live Preview" and Safari, it looks good, but in Firefox, it is about 10px of space.  I found many suggested solutions to add {margin: 0px; padding: 0px ;} but I assured the padding/margins have been set to 0px and still no joy.}  Any other suggestions?

    http://www.spxtech.com/test/index.html

    Remove line 1 of your code

    %@language="JavaScript" CODEPAGE = "65001" % > "

    "Code page 65001 displaying in FireFox Options"

    http://groups.Google.com/group/Macromedia.Dreamweaver/browse_thread/thread/69719a433eac694 9

  • Extra spaces in the lists

    I created an unordered list as follows:
    List < strong > < facilities >: < ul >
    < li > < li >, text of the element list
    < li > < li >, text of the element list
    < li > < li >, text of the element list
    < /ul >
    However, when the page is viewed in a browser, it is a HUGE space (the equivalent of at least 2 lines) between "List" and the first item in the list. How to eliminate or reduce this space?

    Nevermind, I just thought about it:
    UL {}
    margin: 0;
    Padding: 20;
    }
    Li {}
    margin-left: 20px;
    }

  • Thunderbird 38.0.1 on Windows 8.1 shows an extra space on the top or the bottom of some windows

    Thunderbird automatically upgraded to 38.0.1, with some initial problems with incompatible lightning, as said elsewhere, but they were resolved automatically. Now, I have a problem that the main window is moved downwards by a white line, but Thunderbird acts as if she was OK, producing the effect of a calibrated mouse pointer. A message window, on the other hand, shows a black on the bottom and this line similar behavior. Similar things happen with other windows (e.g. Password Manager). If I restart in SafeMode (disabled all addons), everything is fine. If I manually disable all addons and restart, then it shows additional lines, as usual. Weird.

    Any help would be greatly appreciated.
    Concerning

    Just curious... it does not better with hardware acceleration disabled. Tools menu > Options > advanced > general

  • How to remove the extra space between two Table HTML

    Hello

    I wrote a code for printing costs. But there is more space between two Table Html, how I can remove it.

    Please run that Code

    Start

    HTP.p (')
    < html >
    (< body > ');

    HTP.p (')
    < TABLE align = "left" width = "500" cellspacing = "0" cellpadding = "0" border = "1" >
    < tr > < td align = 'right' white-space: nowrap; > Ph-2201751 < table >
    < td > < table >
    < /tr >
    < tr > < td align = "center" white-space: nowrap; > < B > < table > < /B > SATYAM MODERN PUBLIC SCHOOL
    < td > < table >
    < /tr >
    < b >
    < td align = "center" white-space: nowrap; > < i > < H3 > (AFFILIATED to THE CBSC, NEW DELHI CODE No. 53544) < / H3 > < /I > < table >
    < td > < table >
    < /tr >
    < tr > < td align = "center" white-space: nowrap; > new colony Braham, - 131001 (h) < table >
    < td > < table >
    < /tr >
    < tr > < td align = "center" white-space: nowrap; > RECEPTION COSTS < table >
    < td > < table >
    < /tr >
    < /table >
    < TABLE width = "500" cellspacing = "0" cellpadding = "0" border = "1" >
    < b >
    < td width = "100" white-space: nowrap; > receipt no.: < table >
    < td width = "100" white-space: nowrap; > Date received: < table >
    < /tr >
    < b >
    < td width = "100" white-space: nowrap; > name: < table >
    < td width = "100" white-space: nowrap; > father name: < table >
    < /tr >
    < b >
    < td width = "100" white-space: nowrap; > class & s: < table >
    < td width = "100" white-space: nowrap; > A/C No. : < table >
    < /tr >
    < b >
    < td width = "100" white-space: nowrap; > from: < table >
    < td width = "100" white-space: nowrap; > to: < table >
    < /tr >

    (< /table > ');
    HTP.p (')
    < / body >
    (< / html > ');
    end;


    Thank you

    Ed

    Hello

    HTML is valid, that your code print?

    
    

    Wouldn't be as below?

    
    

    BR, Jari

    Published by: jarola on December 18, 2009 15:22
    I test your code
    http://Apex.Oracle.com/pls/OTN/f?p=40323:25
    I can't see any extra space between the tables

Maybe you are looking for

  • Mac active mode dark by himself

    Hello very strange. A few minutes ago, my mac into "dark mode" for himself. I have nothing. Does anyone know why his shot without permission? Is it possible that I got hacked or something like that?

  • Compaq CPU Upgrade SR5045AN

    Hi all I am trying to upgrade the Compaq SR5045AN a single core to a Dual core CPU according to upgrade on the site Web of HP/Compaq: http://support.HP.com/us-en/document/c00881610 The computer is running and I was prompted to enter the correct Date

  • What is the difference between the HP Pavilion 25xi and 2511 x monitors?

    What are the benefits of the HP Pavilion 25xi on the HP Pavilion x 2511 monitors and vice versa?

  • Change language querty

    Hello I added a virtual keyboard that supports a QWERTY Hebrew work and it is great, but the physical works in English - y at - it a solution for this?

  • How can I use two counters simultaneously to pulse width measurment

    Hello, everyone! I'm new to Labview. I currently have some cDAQ9171 and width measurment with 9401 impulses. My understanding is that the 9401 was 4 meters, which means that I can use these meter separately. However I have the following problem. 1. I