Resize JComboBox dropdown doesn't work without customized ListCellRenderer

Based on the forum thread Horizontal scrollbar for JComboBox across multiple look and feel , the following code will work, if only I provide a customized ListCellRenderer (A JPanel with several JLabels).
FYI, here is my ListCellRenderer code [http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/ResultSetCellRenderer.java?view=markup]
Here is the code which adjust the drop down list width. The setup instruction is exactly same as the one mentioned in forum by Kleopatra
    private void adjustPopupWidth() {
        if (this.getItemCount() == 0) return;
        Object comp = this.getUI().getAccessibleChild(this, 0);
        if (!(comp instanceof JPopupMenu)) {
            return;
        JPopupMenu popup = (JPopupMenu) comp;
        JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
        Object value = this.getItemAt(0);
        Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);       
        if (rendererComp instanceof JXTable) {
            scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
        Dimension prefSize = rendererComp.getPreferredSize();
        Dimension size = scrollPane.getPreferredSize();
        size.width = Math.max(size.width, prefSize.width);
        scrollPane.setPreferredSize(size);
        scrollPane.setMaximumSize(size);
        scrollPane.revalidate();
    }However, when come to a JComboBox, without explicitly provided it a list cell renderer, the above code will have NPE being thrown at line
       Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);
       // Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
       // at javax.swing.plaf.basic.BasicComboBoxRenderer.getListCellRendererComponent(BasicComboBoxRenderer.java:94)Hence, I modify the code as follow and hoping it will work.
    private void adjustPopupWidth() {
        if (this.getItemCount() == 0) return;
        Object comp = this.getUI().getAccessibleChild(this, 0);
        if (!(comp instanceof JPopupMenu)) {
            return;
        JPopupMenu popup = (JPopupMenu) comp;
        JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
        Object value = this.getItemAt(0);
        //Component rendererComp = this.getRenderer().getListCellRendererComponent(null, value, 0, false, false);
        Component rendererComp = this.getRenderer().getListCellRendererComponent((JList)scrollPane.getViewport().getView(), value, 0, false, false);       
        if (rendererComp instanceof JXTable) {
            scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
        Dimension prefSize = rendererComp.getPreferredSize();
        Dimension size = scrollPane.getPreferredSize();
        size.width = Math.max(size.width, prefSize.width);
        scrollPane.setPreferredSize(size);
        scrollPane.setMaximumSize(size);
        scrollPane.revalidate();
    }No more exception being thrown this time. Just that my dropdown list doesn't resize at all when I have a long String. It remains normal size as usual, with horizontal scrollbar being shown to catter the long String.
Is there anything I had missed out?
Thanks
Edited by: yccheok on Oct 23, 2010 9:40 PM
Edited by: yccheok on Oct 23, 2010 9:41 PM

Yes. The problem solved. Out of curiosity, is it necessary to have statement? As I remove it, it just work as well.
scrollPane.revalidate();I include SSCCE for this problem.
package sandbox;
import java.awt.Component;
import java.awt.Dimension;
import javax.swing.JList;
import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.plaf.basic.BasicComboPopup;
* @author yccheok
public class NewJFrame extends javax.swing.JFrame {
    /** Creates new form NewJFrame */
    public NewJFrame() {
        initComponents();
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
        jComboBox1 = new javax.swing.JComboBox();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new java.awt.FlowLayout());
        jComboBox1.setEditable(true);
        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Long Long Long Long Item 4" }));
        jComboBox1.setPreferredSize(new java.awt.Dimension(80, 20));
        jComboBox1.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
                jComboBox1PopupMenuWillBecomeVisible(evt);
        getContentPane().add(jComboBox1);
        pack();
    }// </editor-fold>
    private void jComboBox1PopupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
        adjustPopupWidth();
    * @param args the command line arguments
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new NewJFrame().setVisible(true);
    private void adjustPopupWidth() {
        if (jComboBox1.getItemCount() == 0) return;
        Object comp = jComboBox1.getUI().getAccessibleChild(jComboBox1, 0);
        if (!(comp instanceof JPopupMenu)) {
            return;
        JPopupMenu popup = (JPopupMenu) comp;
        JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);
        Object value = jComboBox1.getItemAt(0);
        Component rendererComp = jComboBox1.getRenderer().getListCellRendererComponent((JList)scrollPane.getViewport().getView(), value, 0, false, false);
        //if (rendererComp instanceof JXTable) {
        //    scrollPane.setColumnHeaderView(((JTable) rendererComp).getTableHeader());
        //Dimension prefSize = rendererComp.getPreferredSize();
        BasicComboPopup basic = (BasicComboPopup)comp;
        Dimension prefSize = basic.getList().getPreferredSize();
        Dimension size = scrollPane.getPreferredSize();
        size.width = Math.max(size.width, prefSize.width);
        scrollPane.setPreferredSize(size);
        scrollPane.setMaximumSize(size);
        //scrollPane.revalidate();
    // Variables declaration - do not modify
    private javax.swing.JComboBox jComboBox1;
    // End of variables declaration
}

Similar Messages

  • Adobe premiere element 12 doesn't work without administrator right

    adobe premiere element 12 doesn't work without administrator right.
    I have these 2 messages after i had selected a New project:
    Premiere elements debug event
    premiere elements has encountered an error
    [..\Src\Core\Preferences.cpp-347]
    Microsoft visual C++ Runtime library
    Runtime Error
    Programm:C:\Program Files\A..
    This application has requested the Runtime to terminate it in an unusual way

    then start as administrator.
    if you want to automate that: http://technet.microsoft.com/en-us/magazine/ff431742.aspx

  • Why the imsg doesn't work without a sim card with iOS 7???

    Why the imsg doesn't work without a sim card with iOS 7???

    If it worked for you using iOS 6, then it appears iOS 7 has made some changes.  Was it working before?

  • Elements 11.  Resize image tool doesn't work.  Tried online chat with Adobe  - no help.

    I recently got a new computer (pc) and decided to download Elements 11 instead of the old version that was on my old computer.   I've discovered that the image resizing tool doesn't work, although the other functions seem to be working fine.
    I tried an online chat with Adobe.  Their suggestion was to buy another photo service from them for $10./month !!

    Do you have Resample Image and Constrain Proportions checked?

  • Rollback doesn't work in custom BAPI

    Hi all,
    i have a custom bapi that modify a custom dictionary table; modify goes well, but after that, if i get any problems and i would make rollback, it doesn't work and code in table remains modified !!!!
    Custom bapi is called as follows:
                do.
                  call function 'ZCA_BPXIFDELTA'
                    starting new task gs_file-partnerexternal
                    destination in group p_rfcgr
                    performing return_rfc on end of task
                    exporting
                      data               = gt_data
                      category           = gs_file-partn_cat
                      rec_file           = gs_file_edwh
                      flusso             = flusso
                      g_text             = g_text
                      g_open_log         = g_open_log
                      p_log_l            = p_log_l
                      file_seq           = file_seq
                    exceptions
                      resource_failure      = 4
                      communication_failure = 8
                      system_failure        = 16.
                  case sy-subrc.
                    when 0 .
                      exit .
                    when 4 .    
                    wait until ireturnedtask > istartedtask .
                    when others.
                      exit.
                  endcase.
                enddo.
    may U help me ?
    Please, it's urgent !!!!!
    Kind regards,
    Francesco

    Hi Maksim,
    Based on your description, my understanding is that you want to use custom styles in multiple lines of text field.
    I recommend to check if the column is allowed to use rich text in the custom list.
    Go to List settings > click the column under Columns > check if the Enhanced rich text (Rich text with pictures, tables, and hyperlinks) is selected.
    By the way, you can refer the link below to add custom styles to the ribbon in SharePoint:
    http://rules.ssw.com.au/SoftwareDevelopment/RulesToBetterSharePoint/Pages/CustomStylesForRichHtmlEditor.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Web Dynpro dropdown doesn't work for Adobe Reader 8

    Hi All,
    I've developed a Web Dynpro project which uses Interactive form.
    The form has a dropdown (simple type from WDJ).
    The dropdown works for Adobe Reader 7 but doesn't work for Adobe Reader 8 (when I press the arrow to open the list nothing happens).
    Do I need to config/install something for supporting Adobe Reader 8?
    I'm using J2EE 7.13.
    Thanks,
    Omri

    Dear Omri,
    Make sure that you are using Adobe Reader 8.1.1.
    Thanks and Regards,
    Anto.

  • Gps doesn't work without a sim card

    Does anyone know why GPS on my N900 doesn't work unless my sim card is inserted?
    GPS seems to work on all my other Nokias without sim card (although obviusly it takes much much longer to locate me) but on the N900 I don't seem to get a gps fix at all.
    Any help gratefully received.

    You might like to look at this thread:
    /t5/Maemo-Devices/A-GPS-not-working-on-N900/m-p/584962/highlight/true#M904
    If you change SIM it remembers settings from first one inserted so you may need to go to Settings > Location - disable then enable again.
    Sorry without trawling way back through posts, I don't know where you are located, for example "Assisted GPS" won't work with TMO USA.
    Happy to have helped forum with a Support Ratio = 42.5

  • GPS doesn't work without Edge/3G?

    Been driving around the country this weekend and noticed that with no Edge/3G available (though had it previously to load the Google map) GPS will not locate. Is it possible that Apple has made Location Services dependent on Edge/3G? If so, doesn't this contradict the whole reason for having GPS?

    EDGE/3G provide the "assistance" part of A-GPS. The GPS will work without that assistance, but requires significantly more time to localize you (can take several minutes), and requires line-of-sight to three satellites. The cell data connection helps overcome both of those limitations (in addition to providing the Google map to plot your location on).
    Hope this helps...

  • Brush resize in Liquify doesn't work

    Mac OS X 10.10 (fully updated!)
    Photoshop CC 2014 (latest release!)
    Wacom Intuos 5 Medium (newest drivers!)
    Normal brush increase / decrease with a keystroke setup of [ and ] works fine.
    Opening liquify filter and try to increase or decrease the brush doesn't work at all. Seems the keystrokes in the liquify filter are different (and unknown?!) to increase & decrease the brush size but WHY?

    Solution found:
    Setting up the Wacom Intuos 5 and Photoshop CC 2014 to...
    Brush decrease: #
    Brush increase: NumPad *
    Keyboard language: German
    Works with normal brushes and in the Liquify filter.

  • Why EL doesn't work with custom tags ?!

    I don't know why expression lang. doesn't work with me.
    here's an example, and please tell me why :
    --- the jsp page with EL ==> doesn't work :
    <%-- In the name of ALLAH most gacious most merciful --%>
    <%@ page language="java" %>
    <%@ taglib uri="/cartlib" prefix="cart" %>
    <html>
    <jsp:useBean id="product" class="ch16.cart.ProductCatalog" scope="application" />
    <cart:showCatalog productCatalog="${product}" addToShoppingCartUri="<%= response.encodeURL("AddToShoppingCart.jsp") %>" />
    </html>
    when using expressions instead, the page works .
    the new page is :
    <%-- In the name of ALLAH most gacious most merciful --%>
    <%@ page language="java" %>
    <%@ taglib uri="/cartlib" prefix="cart" %>
    <html>
    <jsp:useBean id="product" class="ch16.cart.ProductCatalog" scope="application" />
    <cart:showCatalog productCatalog="<%= product %>"
    addToShoppingCartUri="<%=
    response.encodeURL("AddToShoppingCart.jsp") %>" />
    </html>
    The error was :
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: jsp.error.beans.property.conversion
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper
    .java:512)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: jsp.error.beans.property.conversion
    org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(Js
    pRuntimeLibrary.java:885)
    org.apache.jsp.ShowProductCatalog_jsp._jspService(ShowProductCatalog_jsp.java:77
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.

    Regarding setup, see this post reply #6
    http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0
    Other potential things to check: make sure you are getting the right value passed in
    productCatalog="${applicationScope.product}"
    ${product} by preference would take a pageContext, request or session attribute before the application level one (it uses pageContext.findAttribute).
    What do you get if you just print out ${product} on the screen?
    It should call a toString() on it for rendering purposes.

  • Check Availability in UWC doesn't work without granting anonymous FreeBusy

    It was reported to me and I could confirm that when user jdoe2 grants user jdoe permission to check Availability but has Availability disabled for anonymous ("Anyone can view my availability" is unchecked), jdoe cannot see jdoe2's availability in UWC but it works in IWC. I noticed this in the http.log:
    [20/Apr/2009:21:33:46 -0400] hostname cshttpd[901]: General Error: ac: GetFreebusy: User "anonymous" denied access on fetching from calendar "[email protected]".
    [20/Apr/2009:21:33:46 -0400] hostname cshttpd[901]: General Error: calstore_fetchcomponents_by_range(): call to ac_fetchcomponents() returning err = 28.
    [20/Apr/2009:21:33:46 -0400] hostname cshttpd[901]: General Error: calstore_fetchcomponents_by_range(): db error (pError->iErr) = 28.
    Why is UWC using anonymous? Can I fix this? jdoe2's acl is @@o^a^rw^g;@@o^c^wdeic^g;[email protected]^p^r^g;[email protected]^a^f^g and I also tried @@o^a^rw^g;@@o^c^wdeic^g;[email protected]^p^r^g;[email protected]^a^f^g;[email protected]^c^f^g;. I even tried making [email protected] an "other owner" but it doesn't work. This particular system is a fresh install of SCSu1 installed today and it has 122793-24 (came with it) and 121657-34 (came with -32.) Thanks.

    Fred@egr wrote:
    It was reported to me and I could confirm that when user jdoe2 grants user jdoe permission to check Availability but has Availability disabled for anonymous ("Anyone can view my availability" is unchecked), jdoe cannot see jdoe2's availability in UWC but it works in IWC. I noticed this in the http.log:
    [20/Apr/2009:21:33:46 -0400] hostname cshttpd[901]: General Error: ac: GetFreebusy: User "anonymous" denied access on fetching from calendar "[email protected]".
    [20/Apr/2009:21:33:46 -0400] hostname cshttpd[901]: General Error: calstore_fetchcomponents_by_range(): call to ac_fetchcomponents() returning err = 28.
    [20/Apr/2009:21:33:46 -0400] hostname cshttpd[901]: General Error: calstore_fetchcomponents_by_range(): db error (pError->iErr) = 28.
    Why is UWC using anonymous?At face value this appears to be a limitation in the product. I've logged a new bug for this issue:
    bug #6832323 - "Check Availability functionality uses "anonymous" for free/busy check vs. logged in users uid"
    Can I fix this?If you want this bug fixed in UWC/CE, you must log a Sun Support request to have the bug escalated. If you don't escalate the bug it WILL NOT be fixed.
    Regards,
    Shane.

  • Ipad2 doesn't work without wifi although I pay Verizon for data. Is there a quick fix for this?

    My ipad2 no longer works without wifi. I pay Verizon for data but it won't work away from a hotspot.  Verizon says this is an apple fix. A girlfriend told me that there may be a quick fix for this that I can do myself without visiting the store?  Anything would be helpful. Thanks to all in advance.

    Check this out.
    http://www.apple.com/support/ipad/wifi/
    @Pagasus
    Maybe you're right, if true, he needs to correct it  to get the proper help.

  • Captivate doesn't work without admin access

    I work in a large organisation and don't have admin access to my machine. IT team have installed Captivate using their admin profile. But when I try to launch it as a "user", the program crashes right away. Adobe support suggested the following but it doesn't work. Has anyone found a way around the problem?
    Ajit: You can do one thing, Could you ask your IT to set this application on Admin mode always for your User Account, which means they need not provide you the admin rights completely but just to this application.Ajit: you can set it by going to installed location of Adobe Captivate.exe-- Right Click-- Properties, Under Compatibility mode, set it to open in admin mode always. Under Security Tab, get your user name added and make sure it recieves Full Control over this application.

    Yes you DO need to run Captivate in  Administrator Mode.  But not having this set up properly doesn't usually cause the app to crash immediately on startup.  If anything, it usually means you crash later on when trying to do something like capture screens. Your problem may be due to something else. 
    One thing that often crops up is corrupted fonts causing the crash.  You can search for posts on that.  Another thing you may need to also investigate is whether or not your organisation is using roaming user profiles.  If they are, then that could also cause your Captivate application to crash.  Captivate 6 in particular suffers from an issue where the Layouts folder that contains Captivate themes is installed by default inside the user's My Documents folder and it cannot be moved from there to another location on the user's hard drive. However, if using roaming profiles, then the shifting location of this Layouts folder has been known to cause crashing.

  • Dropdown doesn't work

    Hi,
    I'm very new to spry and love it's abilities.  That said, I'm sure I'm doing something wrong here.
    What I am experiencing:
    1.  buttons with dropdown working.
    I have been tinkering with this for quite some time and cannot understand what I'm doing wrong; nor can I undo all of the tweeks I have done.
    What I'm attempting to do is:
    1.  Get a gradiated background for horiz. buttons; and have a dropdown for specific buttons.
    2.  Have buttons dropdown below the button hovered.
    3.  Right justified
    4.  Buttons all the same height.
    5.  I'd like to change the width of specific buttons, but don't believe it's possible?
    Big laundry list...sorry
    Any help would be greatly appreciated.
    code for the css as follows:
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    cursor: default;
    width: auto;
    background-image: url(../images/VertNonroll.gif);
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    z-index: 1000;
    background-image: url(../images/VertNonroll.gif);
    float: right;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: 6.5em;
    float: right;
    background-image: url(../images/VertNonroll.gif);
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: smaller;
    z-index: 1020;
    cursor: default;
    width: 8.2em;
    position: absolute;
    left: -1000em;
    background-image: url(../images/VertNonroll.gif);
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    left: auto;
    background-image: url(../images/VertNonroll.gif);
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 8.2em;
    background-image: url(../images/VertNonroll.gif);
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    position: relative;
    margin: -5% 0 0 95%;
    background-image: url(../images/VertNonroll.gif);
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    left: auto;
    top: 0;
    background-image: url(../images/VertNonroll.gif);
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
    background-image: url(../images/VertNonroll.gif);
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    padding: .8em;
    color: #FFFFFF;
    text-decoration: none;
    background-image: url(../images/VertNonroll.gif);
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    color: #FFF;
    background-image: url(../images/VertRollover.gif);
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    color: #FFF;
    background-image: url(../images/VertRollover.gif);
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-image: url(../images/VertNonroll.gif);
    background-repeat: no-repeat;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    background-image: url(../images/VertNonroll.gif);
    background-repeat: no-repeat;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    background-repeat: no-repeat;
    background-image: url(../images/VertRollover.gif);
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    background-image: url(../images/VertRollover.gif);
    background-repeat: no-repeat;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
    position: absolute;
    z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
    display: inline;
    f\loat: left;
    background-image: url(../images/VertNonroll.gif);

    FYI this is the article on the main forum page:
    Announcement: New to Spry, or  the Spry forums?
    Hide Details
    Before you post a topic please verify that:
    You are using the latest Spry files
    The latest version of the Adobe Spry Framework is 1.6.1, this is the same version that ships with Dreamweaver CS4. If you use Dreamweaver CS3 (uses Spry 1.4), its wise to upgrade your files to the latest version. This can easily be done using the Spry Updater that can be found here.
    After that we will have a look at your code.
    Ben

  • Dropdown doesn't work in IE

    I inserted a Spry dropdown menu on my website, but as the
    menu appears at the bottom of the page, I want the submenu to
    appear over, rather than under the main menu. I have changed the
    orientation, and it works beautifully in Firefox and Safari.
    However, when I just had someone look at it IE, they said it was
    behaving unpredictably. Only showing up for a moment, and then
    disappearing when they hovered over it. I tried a fix suggested on
    the Adobe help page, and now it shows up at the bottom of the page,
    and still has the other issues.
    This works in Firefox, Opera, and Safari. However, Internet
    Explorer inserts a space between the submenu and the menu bar, so
    you need to adjust the bottom value in step 3 by creating an
    Internet Explorer conditional comment inside your page, and placing
    it after the link to SpryMenuBarHorizontal.css like this:
    <!--[if IE]>
    <style type="text/css">
    ul.MenuBarHorizontal ul {
    bottom:0;
    </style>
    <![endif]-->
    Did I insert it in the wrong spot? How do I make it drop-up
    predictably in IE?
    Thanks in advance for your help...

    It looks like you didn't define the VISITED state of the
    link. And make sure
    they're defined in the order: link, visited, hover, active to
    make sure they
    work properly.
    MD
    the9Ulaire wrote:
    > Here is the link to the page I am working on:
    >
    > <a target=_blank class=ftalternatingbarlinklarge
    > href="
    http://www.lwrussell.com/Templates/first.dwt
    >
    > Everything">
    http://www.lwrussell.com/Templates/first.dwt
    >
    > Everything</a> works perfectly in Firefox. Yet in
    IE, the link's
    > text acts like a regular link once "visited" , yet I am
    using CSS to
    > define it as it's own type. How can I fix this?

Maybe you are looking for