Accordion Component Header selection

Hi. It's me again.
Using the Acorrdion Component, I have put together an
accordion with 5 headers. The default seems to have the first
header open and the remaining headers underneath. Is there a way to
select which header defaults as open? The accordion is rather long
and the closed headers are at the bottom. I'd like to start with
the bottom header open.
Thanks.
Martoons

Hi martoons1,
Try this after creating the accordion mc:
acc_mc.selectedIndex=acc_mc.numChildren+1;
replacing acc_mc with the instance name of your accordion.
Regards
Robert

Similar Messages

  • Custom skin for accordion component

    Hi,
    I need to create an accordion component that looks like following image:
    I tried this tutorial: http://blog.flexexamples.com/2009/06/21/creating-a-custom-halo-accordion-header-skin-in-fl ex-4/
    I am able to create the background gradient with help of above tutorial.
    I have 3 questions now:
    How to style the header text?
    How to add a link on the active header?
    How to add rounded corner for closed state of last heading only?
    Any help on this is appreciated.
    Best Regards,
    Alok Jain

    You have to download flexlib.swc file.
    Just create custom itemrenderer
    <CanvasButtonAccordionHeader
        xmlns="flexlib.containers.accordionClasses.*"
        xmlns:mx="http://www.adobe.com/2006/mxml"
      mouseChildren="true"
        verticalScrollPolicy="off" horizontalScrollPolicy="off"
         >
        <mx:Script>
             YOUR SCRIPT HERE
            ]]>
        </mx:Script>
       [YOU CAN CREATE A LINK BUTTON HERE]
    </CanvasButtonAccordionHeader>

  • Accordion Component

    Hello,
    I am using an accordion component and I want all the fields
    to be closed when the viewer first see it. What do I put in the
    parameters to accomplish this?
    Thanks,
    Bernie

    Bernie,
    > I did find selectedIndex under the binding tab. Is that
    > were I am suppose to make the change?
    No. The Bindings tab allows you to set up potentially
    complex data
    binding between components, so that (for example) a component
    button click
    might update the selectedIndex property of your accordion --
    all without
    your having to write ActionScript -- but it's much easier to
    plunk down a
    quick line of code.
    > Can you explain it a little more? Or are you talking
    about
    > adding that to the AS?
    Sure thing! Sorry I wasn't more clear earlier. Select your
    Accordion
    in the property inspector (the Properties tab or the
    Parameters tab, either
    one). You'll see where you can give your component an
    instance name, such
    as myAccordion.
    Now that the component has a unique instance name, it can be
    referenced
    by ActionScript. Create a new layer for your ActionScript, if
    you haven't
    already. Call it "scripts" or "actions" or something that
    makes sense to
    you. Assuming all of this is in frame 1, click into frame 1
    of your scripts
    layer and open the Actions panel (Window > Actions) and
    type:
    myAccordion.selectedIndex = -1;
    ... where "myAccordion" is the instance name you chose in the
    previous step.
    If your Accordion happens to make its appearance on frame
    15, then
    you'll have to add a keyframe to frame 15 of your scripts
    layer and place
    that line of ActionScript there. It doesn't really matter, so
    long as the
    keyframe that holds your code and the keyframe that
    introduces the
    instance-named component are aligned on the same frame.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Tree expand problem with Accordion Component

    While using Accordion component with creationPolicy="all", tree components which are placed in accordion's different panels, will not expanded at creationcomplete.
    Trees are created perfectly but not expand its level at initial creationComplete time.
    If I placed tree in regular panel and executed, tree levels are perfectly expaned.
    Expand level code is called at creationComplete of Tree.
    Steve Roger.

    i got my mistake.
    I am using callLater(). Now its working perfect.

  • Accordion component property .enabled has no function???

    Hi, the subject pretty much sums it up. I created an
    accordion component, but setting its .enabled property - which
    according to the component help it has (inherited from UIComponent
    class) - has no effect!

    You can also check for problems with the places.sqlite database file in the Firefox profile folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file

  • Text in the title bar of an Accordion component

    Hi -
    I have an accordion component on my swf. Its working right
    but the text in the title bars (where I click to flip the accordion
    pages) is coming up bold when I want it normal. How do I change
    this?
    Thanks.
    D2

    If you are using Windows, you do it through the Control Panel tool for customizing your desktop display. If you are using some other system, I don't know. You can't do it from your Java program.

  • ADF Faces + accordion component

    Hi all,
    Has anyone out there used any 3rd party "accordion" component with ADF Faces? Examples of one's that I've found but not tried:
    Google Web Toolkit (GWT) StackPanel widget - might be hard to integrate with JSF
    MyFaces accordionPanel - pretty nice, but it's still in the "sandbox" project
    IceFaces has an in-development accordion - IceFaces doesn't play nice with ADF Faces components on the same page due to a special renderer
    Spry Accordion from Adobe - similar comments to GWT.
    Some examples of what I mean:
    The Mail/Tasks/Contacts item here: http://code.google.com/webtoolkit/documentation/examples/desktopclone/demo.html
    http://archive.dojotoolkit.org/nightly/tests/widget/test_AccordionContainer.html
    http://www.irian.at/myfaces-sandbox/accordionPanel.jsf
    The closest thing in ADF Faces is the af:showOnePanel, which is pretty close, but not exactly what I'm looking for. Perhaps with some skinning, I could get it to look different (no +/- in the little triangle, etc). An update... thanks to BUG 5682799, we are not able to get rid of the little hide/disclose (+/-) widget - the skin selector for that item is ignored.
    Thanks for any insight.
    John

    Hi John,
    Bug 5682799 has been fixed in JDeveloper 10.1.3.3
    If you need a one-off patch for a prior release of JDev, please contact Support.
    Regards,
    Didier.

  • Has anybody ever used the Accordion component?

    The way an Accordion component currently functions is, when a
    user clicks on a segment it slides to display the content.
    I would like it to slide and display the content when the
    user rolls over a segment, but I can't figure out how to detect the
    index of the segment that the user rolls over.
    Also I can't figure out how to align the labels right and
    change the text to white. My code is below, please help.
    import mx.containers.Accordion;
    //skinning the segments
    Accordion.prototype.falseUpSkin = "falseUpSkin";
    Accordion.prototype.falseDownSkin = "falseDownSkin";
    Accordion.prototype.falseOverSkin = "falseOverSkin";
    Accordion.prototype.falseDisabledSkin = "falseDisabledSkin";
    Accordion.prototype.trueDownSkin = "trueDownSkin";
    Accordion.prototype.trueUpSkin = "trueUpSkin";
    Accordion.prototype.trueOverSkin = "trueOverSkin";
    Accordion.prototype.trueDisabledSkin = "trueDisabledSkin";
    //creating the segments
    var s1 = mainAccordian.createSegment("content1", "s1",
    "label1");
    var s2 = mainAccordian.createSegment("content1", "s2",
    "label2");
    var s3 = mainAccordian.createSegment("content1", "s3",
    "label3");
    var s4 = mainAccordian.createSegment("content1", "s4",
    "label4");
    var s5 = mainAccordian.createSegment("content1", "s5",
    "label5");
    var s6 = mainAccordian.createSegment("content1", "s6",
    "label6");
    var s7 = mainAccordian.createSegment("content1", "s7",
    "label7");
    setAccordionStyle(mainAccordian);
    // can't detect when the user rolls over a segment or get the
    index
    // of that segment
    s1.onRollOver = function() {
    // this only seems to detect when the user rolls over the
    // content of the selectedIndex
    //aligning the text right and changing the font color to
    white doesn't work
    function setAccordionStyle(accordion) {
    accordion.setStyle("headerHeight", 31);
    accordion.setStyle("fontFamily", "Verdana");
    accordion.setStyle("textAlign", "right");
    _global.styles.AccordionHeader.setStyle("fontColor",
    "white");
    _global.styles.AccordionHeader.setStyle("fontSize", 12);
    }

    Hi syed..
    Please use FM MD_STOCK_REQUIREMENTS_LIST_API to get all information for transaction MD04/MD05.
    You might also want to check out the function module API.
    MD_MRP_LIST_API
    and also
    check this link for extracting data from MRP tables:
    http://www.sap-img.com/pp001.htm
    If it helps Reward with points..
    Regards Rk..

  • Listbox component, multiple selections and databases

    Hello, I have a listbox component bound to a database. It populates alright, but when I want to set the default selections and add an array of String objects to the listbox's selected property, they never appear selected. I set the array in the prerender method. Has anyone done this before? I searched and only found different situations.
    TIA,
    Scott

    Here is an excerpt from http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/about_components.html
    "One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. ..."
    "For the items property, you specify a display label and a return value for each item in the list. The selected property returns an object, or, if the multiple property is selected, an array of objects, of the same type as the return values. "
    " If the multiple property is false, the value of the component's selected property matches the return value of the selected list item. If the multiple property is set to true (to enable the user to select more than one item), you must bind selected to an array of Object, an array of primitives, or java.util.List. If you use java.util.List, you must specify a converter for the type of the List members unless they are String objects. The array contains values that match the return values of the selected items."

  • Customising the accordion component colours

    Hi,
    Does anybody know of a way to customise the colours in the
    accordion component. I need to change the button colour, and the
    background colour.
    Thanks,
    Dylan

    You can check that in Flash Help Components > Components
    Language Reference > Accordion component (Flash Professional
    only) > Customizing the Accordion component (Flash Professional
    only) and also Components > Using Components > Customizing
    Components. :D
    It explains everything.
    Here's a sample code copied from Flash Help:
    var section1 = accordion.createChild(mx.core.View,
    "section1", {label: "First Section"});
    var section2 = accordion.createChild(mx.core.View,
    "section2", {label: "Second Section"});
    var input1 = section1.createChild(mx.controls.TextInput,
    "input1");
    var button1 = section1.createChild(mx.controls.Button,
    "button1");
    input1.text = "Text Input";
    button1.label = "Button";
    button1.move(0, input1.height + 10);
    var input2 = section2.createChild(mx.controls.TextInput,
    "input2");
    var button2 = section2.createChild(mx.controls.Button,
    "button2");
    input2.text = "Text Input";
    button2.label = "Button";
    button2.move(0, input2.height + 10);
    accordion.setStyle("fontStyle", "italic");
    I think the buttons inside the components can be changed
    using global styles.
    Use this code:
    _global.style.setStyle("color", 0xCC6699);
    _global.style.setStyle("themeColor", 0xFF00FF)
    _global.style.setStyle("fontSize",16);
    _global.style.setStyle("fontFamily" , "_sans");
    _global.style.setStyle("fontWeight" , "bold");
    Change the colors :D they are in pink lol
    Regards.

  • Macromedia Flash Accordion component

    Hi,
    Can I change a "Selected headers text color" in a Flash
    Accordion?
    I have to change the selected header's font color. Please
    suggest...

    I couldn't get an answer to your question, but I found this technote which may have a link that will get you where you need to go:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14311

  • Focus shifted to next component after selecting item in combobox.....

    I have Table and a textfield as only two UI components.
    For the table i am using my custom editor(NewComboEditor.java), for this i am extending the "DefaultCellEditor" and applying this editor for my jTables first column. My custom editor simply prepares the editor by instantiating the jCombobox and sets the selected value and return it (in overwridden "getTableCellEditorComponent" method).
    I have made my combobox editable by setting "combobox.setEditable(true)" in constructor of editor while creating the instance of combobox.
    Now everything works fine except whenever i tried to select an item from the combobox , after the item selection, focus is assigned to textfield which is the nextfocusable component to jTable on which the comboboxes are rendered.
    If my jcomboboxes are not editable then selection remains on combobox only.
    The implemetation for the comboEditor and comboRenderer is as follows.
    =========================== Main frame having all compenents =================================
    public class CreateAndShowComboBoxes extends JFrame {
        protected JTable table;
         * Default constructor..
        public CreateAndShowComboBoxes() {
          Container pane = getContentPane();
          pane.setLayout(new BorderLayout());
          //create table model, this table model extends AbstractTableModel.
          MyTableModel tableModel = new MyTableModel();
          table = new JTable(tableModel);
          TableColumnModel tcm = table.getColumnModel();
          TableColumn tc = tcm.getColumn(MyTableModel.LAST_NAME);//set to column 1.
          //specify the renderer and editor.
          tc.setCellRenderer(new ComboRenderer());     
          tc.setCellEditor(new NewComboEditor());
          JScrollPane jsp = new JScrollPane(table);
          pane.add(jsp, BorderLayout.CENTER);
          JTextField textField = new JTextField();
          table.setNextFocusableComponent(textField);
          pane.add(textField, BorderLayout.SOUTH);
         * Create a frame and make it visible.
        public static void main(String[] args) {
            CreateAndShowComboBoxes stt = new CreateAndShowComboBoxes();
            stt.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            stt.setSize(400, 300);
            stt.setVisible(true);
    ============================================ComboEditor =========================================
    public class NewComboEditor extends DefaultCellEditor{
         *Default constructor.
        public NewComboEditor() {
            super(getComboBox());
            JComboBox combobox = (JComboBox)getComponent();
            combobox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //fireEditingStopped();
                    //stopCellEditing();
         * Override to invoke setValue on the formatted text field.
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
                                                        int row, int column) {
            JComboBox cb = (JComboBox)super.getTableCellEditorComponent
                                            ( table, value, isSelected, row, column);
            cb.setSelectedItem(value);
            return cb;
         * @return object
        public Object getCellEditorValue() {
            JComboBox cb = (JComboBox)getComponent();
            Object o = cb.getSelectedItem();
            return o;
         * @return true
        public boolean stopCellEditing(){
            JComboBox cb = (JComboBox)getComponent();
            cb.requestFocus(true);
            return super.stopCellEditing();
         * @return combobox instance
        public static JComboBox getComboBox(){
            JComboBox combobox = new JComboBox();
            combobox.setEditable(true);
            combobox.addItem("khan");
            combobox.addItem("rawal");
            combobox.addItem("shetti");
            combobox.addItem("more");
            combobox.addItem("sohel");
            combobox.addItem("kambli");
            combobox.addItem("warne");
            return combobox;
    ========================================= ComboRenderer ====================================
    public class ComboRenderer extends JComboBox implements TableCellRenderer {
         *Default constructor.
        public ComboRenderer(){
            super();
            addItem("khan");
            addItem("rawal");
            addItem("shetti");
            addItem("more");
            addItem("sohel");
            addItem("kambli");
            addItem("warne");
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column) {
          setSelectedItem(value);
          return this;
    ======================================================================================Message was edited by:
    yuvi
    Message was edited by:
    yuvi

    Hi Pravin Ghadge,
    Please Use this code for focus.
    oMat.Columns.Item("Column_UID").Cells.Item(oMat.VisualRowCount).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    I hope it will work.
    Thanks,
    P.T.Sampath.

  • List Component - Multi-select retrieve data

    Hey there,
    I'm having trouble retrieving the value of a multi-select
    list component. It always traces the last value selected, but I
    need to trace all values to parse the data.
    I've been using trace(myList.value);
    thanks!
    Billy

    Hi
    "selectedItems" will give you the items selected.
    var data_array:Array = new Array({data:1, label:"yaho"},
    {data:2, label:"proper"}, {data:3, label:"myname"}, {data:4,
    label:"thatfigure"}, {data:5, label:"fulltight"}, {data:6,
    label:"mythigsare"}, {data:7, label:"thatis"}, {data:8,
    label:"thisda"});
    lst.dataProvider = data_array;
    lst.addEventListener("change", mx.utils.Delegate.create(this,
    mySelection));
    function mySelection(evt) {
    var _items = evt.target.selectedItems;
    for (var i = 0; i<_items.length; i++) {
    trace(_items
    .label);
    trace("----------------");

  • Component to select a folder/directory

    Hi
    Like file dialog which is used to select a file, is there any component in the UIX to select a perticular folder/directoy.
    Please tell me if there any other solution.
    Pradeep

    Hi
    Check these codes
    selection-screen begin of block b1 with frame .
    Parameters File(100) lower case.
    selection-screen end of block b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
    *     DEF_FILENAME           = ' '
          DEF_PATH               = '*.*'
    *     MASK                   = ' '
    *     MODE                   = ' '
    *     TITLE                  = ' '
        IMPORTING
          FILENAME               = FILE
    *     RC                     =
    or
    PARAMETERS:P_FILE LIKE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
       PROGRAM_NAME        = SYST-CPROG
       DYNPRO_NUMBER       = SYST-DYNNR
      IMPORTING
       FILE_NAME           = P_FILE.

  • Member block component only select dense dimension members

    I used Calculation Manager to create Business Rule for Planning app. The Member Block component only show dense dimensions. Why?

    Its trying to force you to write the calculation optimally. Calculations with sparse member blocks are much slower than dense dimension blocks. Even if you cannot select, you can always type in the sparse dimension member name. You dont need to use member selector.

Maybe you are looking for

  • Help needed on Outbound Goods Receipt (IDoc)...

    Hi Experts,   Can we use the message type WMMBXY and IDoc type WMMBID02 for Outbound Goods Receipts scenario also (Sending Goods Receipts information to target system).   Because WMMBID02 seems to be for Inbound going by the documentation in WE60. Ca

  • Using iMac as display for Windows 7 (thunderbolt to thunderbolt)

    I currently have a 27-inch Mid 2011 iMac running OS X Yosemite, and my company has issued me a Lenovo W540 that is running Windows 7 and has a thunderbolt port (not mini-display -- yes, I'm sure). I have spend countless hours trying to use my iMac as

  • How to reset password on my Satellite notebook?

    Broke a habit of a lifetime and set up a password on my new laptop during first set up. Now I am trying to start it up for the first time it is telling me that the password is wrong and won't let me in ! and I know it is right because it is the same

  • ADC to DVI connector cable - 2 for 1?

    Will this cable enable me to run a data projector from the ADC port at the same time as the monitor attached to the DVI? G5 Dual 2.5   Mac OS X (10.3.7)  

  • Want to have two sites on .Mac made with iWeb

    I have two folders on my iDisk in the Sites folder with different names. How do I get two different URL's for each website. So with two folders each titled different can I use the folder names like http://web.mac.com/foldername/welcome.html http://we