Dynamic overall Accordion height

I have several Spry Accordions in my application. The number
of panels in each of these accordions are database driven, where
each user can customize the number of panels and their titles. The
new SpryNestedXMLDataSet is used to show the data in each panel.
This works extremely well!
However, the layout of the page dictates that the overall
height of the accordion be the same, weather it be for 3 panels or
for 10 panels. Is there a way that this can be achieved in
Spry?

Hi Ben,
now I see your request....
you want a fix height container in which to have the
accordion with X panels...
You can add the accordion inside another div container for
which you set a fix height and don't forget to add also
overflow:auto (this is to see only the content what fits in the
height you specified).
You should have something like this:
<div style="height:600px; overflow:auto;">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1</div>
<div class="AccordionPanelContent">
<p>Content 1</p>
</div>
</div>
....... as much panels you need...
</div>
</div>
So just add a new div with that two properties around the
accordion.
Please let me know if I answered to you question,
Diana

Similar Messages

  • Dynamic Accordion height (revisited)

    Hi All,
    I have an application that allows the user to add or remove
    Accordion panels at will. My problem is that I want to keep the
    overall Accordion height constant independent of the number of
    panels.
    I have found a simple way to keep the overall height of an
    Accordion constant by varying the AccordionPanelContent height as
    follows:
    <div class="AccordionPanelContent" style="height:
    expression(500-(20*{ds_RowCount})+'px'); margin: 0px;">
    The problem is that it only works in IE5+.
    Is there a way to achieve the same result for other browsers?

    quote:
    Originally posted by:
    Barascu Diana
    Hi,
    you can use expression () only for IE and if you want to get
    the same behavior for the other browsers, you should write some
    java script code to compute the height and then to set it on the
    element.
    Something like this:
    var el = document.getElementById('id_{ds_RowID}');
    if (el){
    el.style.height = 500 - (20 *
    (isNaN(parseInt('{ds_RowCount}'))? 0 : parseInt('{ds_RowCount}')))
    + 'px';
    Diana
    Hello Diana,
    Thank you very much for your quick response. I used your
    script and it and it works like a charm.
    Kind regards,
    Ben

  • How to dynamically fix datagrid height by records in dataprovider?

    i need to dynamically fix datagrid height by how many records
    are contains in dataprovider (No Scrollbar), but when i attempt to
    specific the row height, the row height is always out of i expected
    and the scrollbar is appear, how can i do that?

    You can set rowCount instead of height.
    Tracy

  • Page length doesn't snap to accordion height when accordion at page bottom becomes shorter?

    Hello, I created a page with an accordion widget at the bottom of the page and rather than snapping to the height of the accordion the page sticks to the length of the tallest accordion height. You can see my test page at http://hawksgym.com/cesarnoel/   Is there something I can do or will I have to resort to all the accordion divs always adding up to the same height?

    Hi,
    Do you have Sticky Footer Checked? If yes, please uncheck it and then try.
    Regards,
    Aish

  • Accordion Height Issue

    I have apage I am working on and testing the Spry and various
    elements on...
    http://www.tommylogic.com/web-design/
    I have the tabs opening fine now and all styled like I want
    it. The issue I am having is on 3 items:
    - When I first try to open and close the panels, the first
    click never opens it. Only after the 2nd or thrird click or tab
    that I click on.
    - When they do open, they open in consistent heights,
    sometimes with a scrollbar, sometimes not.
    -Then when I get one open it wont always show all the
    content in that particular panel <div>.
    - If I close specific panel that is open first, then open
    the new panel, it seems to do a bit better, but not always the
    same.
    I am passing it through like this
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    var acc8 = new Spry.Widget.Accordion("Accordion1", {
    useFixedPanelHeights: false, defaultPanel: -1 });
    All the heights are cleared in the CSS as well.
    Any clues?
    //////////////////////// resolution
    removed extra line and changed var to Accordion1
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", {
    useFixedPanelHeights: false, defaultPanel: -1 });
    and some minor css tweaks in there as well.
    Thanks Anyway... -T

    Wrap the Accordion in a VBox and you should be all set.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="init();">
      <mx:Script>
        <![CDATA[
          import mx.containers.VBox;
          private function init():void{
            for(var a:uint=0;a<100;a++){
              var vb:VBox = new VBox();
              vb.label = "MyVBox" + a;
              vb.width = 200;
              vb.height = 100;
              acc.addChild(vb);
        ]]>
      </mx:Script>
      <mx:HDividedBox width="100%" height="100%">
        <mx:VBox width="50%" height="100%"/>
        <mx:VDividedBox width="50%" height="100%">
          <mx:VBox width="100%" height="50%"/>
          <mx:VBox width="100%" height="50%">
            <mx:Accordion id="acc" width="100%" height="50%"/>     
          </mx:VBox>
        </mx:VDividedBox>
      </mx:HDividedBox>
    </mx:Application>
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • Dynamically changing the height and width of Stage

    Hi,
              I would like to know how can I change the height and width of stage dynamically. I tried it with the following code:
                             Stage.height = 250;
                             Stage.width = 250;
    during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging. Anybody have any idea about this.

    Hi Ross,
                I could understand something about the problem after making a research on this topic. We can't change the width and height of stage from actionscript itself, right? I will explain the way I am planning to do. I don't know whether its right or not. Anyway you just go through it. First the player need to be resized, according to the specified height and width. Then in the object tag, there are two fields named height and width. We should change these value according to the specified height and width of video controller, dynamically. Am I right? But I am confused with two properties of Stage such as: align and scaleMode. The code was actually developed my trainer. There, the scaleMode is set to "noScale" and no align property is used. My doubt is how should I set align and scaleMode properties of Stage. Hope you understood what I meant.
    Regards,
          Sreelash.S.

  • Manupulating Jquery Accordion height

    Hi all,
    I have downloaded accordion css and its js from jquery website and have implemented accordion in our application. Has anyone played with its js or css to decrease or increase the height of the header title of all the regions included in the accordion? Pls help. Its urgent. Thanks
    With Regards,
    Sunil Bhatia

    If any one having similar issue here is the solution.
    Just replace the Template code from [Patrick's solution|https://forums.oracle.com/forums/thread.jspa?messageID=4429587] with the below one :
    <div id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
    #BODY##SUB_REGION_HEADERS##SUB_REGIONS#
    </div>
    <link rel="stylesheet" href="#IMAGE_PREFIX#libraries/jquery-ui/1.8/themes/base/jquery.ui.accordion.css" type="text/css" />
    <script src="#IMAGE_PREFIX#libraries/jquery-ui/1.8/ui/minified/jquery.ui.accordion.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    apex.jQuery(function() {
      apex.jQuery("##REGION_STATIC_ID#").accordion({
                   autoHeight: false
      var autoHeight = apex.jQuery("##REGION_STATIC_ID#").accordion( "option", "autoHeight" );
      apex.jQuery("##REGION_STATIC_ID#").accordion( "option", "autoHeight", false );
    </script>Rest all remains same.
    Good luck.

  • Accordion Height

    Hi All,
    How can I provide the getHeight() Api for accordion.
    I am aware about maxHeight property of accordionSection.
    But my requirement is to implement getHeight() api on accordion, which will take care of all the sections heights, expanded section and also browser specific paddings. in essence resizing should also be considered.
    Has anyone tried this?
    Any pointers would be helpful.
    Thanks.

    Please mark this Discussion with a Correct Answer and Helpful Answer where appropriate.  See http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why   Even if you discovered the solution without any outside contributions, it helps others to understand what the solution turned out to be.
    Regards, Mike
    SAP Customer Experience Group - CEG

  • How to edit the accordion height?

    Hi,
    first of all, sorry for my english ;)
    I tried to edit my Spry Accordion's height like that:
    <div id="Services" class="Accordion" tabindex="0"
    style="height: 500px;">
    but it seems to make an error in the accordion (
    view
    screen). how can i modity the height of this "control" without
    any problem in the design...
    Thanks,
    Regards.

    Hi,
    if you want to use a fix layout, then you should use a
    formula for computing correctly the height.
    For the accordion situation, you should use a formula like
    this:
    Accordion_container_height = sum of all (PanelTabs_height) +
    PanleContent_height + sum of all(margins, paddings and borders).
    This is translated to: the Accordion container height
    depends by all the tabs height, the PanelContent height and also
    you should not forget by the borders, paddings and margins.
    In your case, you should compute first the height for all
    Panles tabs together plus content plus borders, margins and then
    you'll have the correct size for the container that you initially
    set to 500px
    Hope this helps,
    Diana.

  • Dynamic Text Field Height (k)

    I have generated a dynamic Text Field through ActionScript
    (actually it
    generates a bunch)
    this["char"+ii].createTextField("true_txt", 997+ii, 0, 0, 1,
    1);
    Everything is working well, with one exception. I have the
    font, size,
    color done through ActionScript. The particular font I am
    using,
    ElanBook is getting cut off in the Text Field slightly.
    I've tried a number of methods to get the text field taller,
    but no
    dice. Is there a way to specify that the text align within a
    Text Field
    to the center, bottom, baseline, etc. using ActionScript?
    -Kirk

    no, but you can size your textfield using any number of
    textfield properties. in particular, you should check the autoSize
    property.

  • CF Report Builder 9: Dynamic Footer Band Height

    Problem:
    I have a coldfusion (.cfr)  and need to be able to either set the height of the footer band or set the bottom margin so that the report can be printed onto custom paper which has pre-printed information in at the bottom of the page.
    Can this be done:
    Is it possible to programically set the Footer Height in report builder or even have the footer band expand with its contents. There are options there called Stretch with Overflow but these don't appear to work on this band.
    Or
    Is is possible to programically set the bottom margin of the report for all pages when I am calling it from coldfusion 9
    <!---Create Report--->         
    <cfreport template="../reports/reportFile.cfr"
              style="mystyle{ defaultStyle: false; font-family:'Arial'; color: ##000000;}"
              format="#reportFormat#"
              query="#reportQ#">
              <cfreportParam name="lblTitle" value="#reportTitle#">
    </cfreport>
    I cannot figure this out. Someone please help!

    Another developer on my team sent me a report that worked and
    I noticed that I had set the Print Order to horizontal when I was
    trying to fix another issue. Changed it back to vertical and it
    works fine. Not sure why that should have mattered, but it works.

  • Dynamically determine the height of Top-of-page of an ALV report

    Hi all,
    I wanted to know if there is a way to determine and set the height of an HTML-TOP-OF-PAGE based on it contents?
    Thanks in advance
    Shabir

    this is the final option for you. try with this..
    REPORT  ZTEST_ALV_001.
    TYPE-POOLS: SLIS.
    data: it_sort type  SLIS_T_SORTINFO_ALV,
          wa_sort like line of it_sort.
    data: it_flight type standard table of sflight.
    DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FCAT LIKE LINE OF IT_FIELDCAT.
    data: o_grid TYPE REF TO cl_gui_alv_grid.
    start-of-selection.
    select * from sflight
    into table it_flight
    up to 20 rows.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = SY-REPID
       I_STRUCTURE_NAME             = 'SFLIGHT'
      CHANGING
        ct_fieldcat                  = IT_FIELDCAT
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
    IF sy-subrc NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = SY-REPID
       I_CALLBACK_html_TOP_OF_PAGE       = 'TOP_OF_PAGE'
       I_STRUCTURE_NAME                  = 'SFLIGHT'
       IT_FIELDCAT                       = IT_FIELDCAT
      TABLES
        t_outtab                          = IT_FLIGHT
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF sy-subrc NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM top_of_page USING header TYPE REF TO cl_dd_document.
    DATA: ls_text TYPE sdydo_text_element,
          meth(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
    if o_grid is initial.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = o_grid.
    CALL METHOD o_grid->parent->parent->(meth)
    EXPORTING
    id = 3
    height = 14.  "<-----set the height here..
    "using the add_text method you can show the texts
    "in the top of page
    ls_text = 'Top of page:'.
    CALL METHOD header->add_text
    EXPORTING
    text = ls_text
    sap_emphasis = 'strong'.
    "for new lines
    CALL METHOD header->new_line.
    CALL METHOD header->new_line.
    endif.
    break-point.
    ENDFORM.

  • Dynamically  loading   Accordion  with  Hierarchical XML

    Hi
         I need to construct a layout where i need to populate Accordion with an hierarchical XML.
         As i am new to flex, Kindly guide me .
    Regards,
    Rajesh S

    We need more info. Please give a sample of your data and a simple yet complete description of how it should be used to populate your UI.
    If this post answers your question or helps, please mark it as such.

  • Accordion Panel Height

    At the beginning of the SpryAccordion.js there is code
    commented-out that hints at the ability to dynamically define
    accordionPanel heights (rather than the default "200"). I am not a
    master javascripter and I've been banging my head against this all
    day long. The animation of the accordion destroys the rendered
    height information.
    I was wondering if anyone had a quick-fix for this.
    Thanks.

    Thanks for the response. I understand that this isn't a
    production release...I was just hoping there was an easy workaround
    that I wasn't skilled enough to see yet.
    My problem isn't setting the accordion panel to another
    value. What I was hoping to do is have the accordion behave the
    same way it does with animation set to false: each panel is as big
    as the content. Right now, with animation turned on, every panel in
    the accordion is the same height (200, 400, whatever you set it at)
    regardless of how much content is in there. The animator sets the
    height of elements to 200 or to zero, which destroys the original
    height information. I understand why it needs to do this.
    I was trying to have the panel animator store the height in a
    variable, run the animation that kills the height, set the display
    for the hidden panel to "hidden" (the way it achieves things in the
    non-animated version), and then reapply the original height.
    Unfortunately, I am not handy enough with javascript to make this
    happen.
    I don't expect a solution (I know you have many other,
    important things on your hands)...but if there is an answer, it
    would be greatly appreciated.

  • Dynamically set flash chart height?

    Hi,
    I have a flash chart that includes a selector that alters the query for the chart. Depending on what the user selects, the chart shows a different number of rows (this happens to be a stacked horizontal bar chart, but this could apply to any chart type). I would like to be able to dynamically set the chart height based on the number of rows the query returns. If I set it too small and the user makes a choice that returns a larger number of rows, the chart bars are compressed to the point where the labels are unreadable or omitted altogether. Conversely, if I set the height to a larger value and the user makes a selection that results in a small number of rows, the chart is overly extended and hard to read.
    I am able to calculate what I'd like the chart height to be using a page item and a before header process. But I can't figure out how to pass this value to AnyChart. I tried using an item substitution (e.g., &P7_CHART_HEIGHT.) as the value for the chart height on the Chart Attributes/Chart Settings page, but this attribute requires a non-zero numeric value. I tried to figure out if I could alter the chart XML, but could not figure out how to do it and I'm not sure item substitutions would be passed in the XML anyway.
    Is there a way to dynamically set the height attribute of a chart at page load time?
    Thanks,
    Mike

    Hi Mike,
    You can update the Region Source of your chart, replacing the substitution strings *#HEIGHT#* with the reference to your page item *&P7_CHART_HEIGHT.*. So your chart region source should then look something like the following(note that I've trimmed some lines for display purposes), and when the chart is run it will pick up your setting for the height, based upon the value returned from your Before Header process:
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        codebase="#HOST_PROTOCOL#://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
        width="#WIDTH#"
        height="&P7_CHART_HEIGHT."
        id="#CHART_NAME#"
        align="top">
    <param name="movie" value="#IMAGE_PREFIX#flashchart/anychart_5/swf/...............................">
    <param name="quality" value="high">
    <param name="allowScriptAccess" value="sameDomain">
    <param name="allowNetworking" value="all">
    <param name="scale" value="noscale">
    <param name="wmode" value="transparent">
    <param name="FlashVars" value="initText=#FLASH_INIT#&xmlLoadingText=............................................">
    <embed src="#IMAGE_PREFIX#flashchart/anychart_5/.......................................
           quality="high"
           width="#WIDTH#"
           height="&P7_CHART_HEIGHT."
           name="#CHART_NAME#"
           scale="noscale"
           align=""
           allowScriptAccess="sameDomain"
           allowNetworking="all"
           type="application/x-shockwave-flash"
           pluginspage="#HOST_PROTOCOL#://www.macromedia.com/go/getflashplayer"
           wmode="transparent"
           FlashVars="initText=#FLASH_INIT#&xmlLoadingText=#FLASH_................................................">
    </embed>
    </object>
    #CHART_REFRESH#
    {code}
    I hope this helps.
    Regards,
    Hilary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for