Menu

How to add images beside the menu items?

Help
swordfish
2007-03-12
2013-04-29
  • swordfish

    swordfish - 2007-03-12

    Does Roma's menu item component support both text and image?

     
    • Luca Garulli

      Luca Garulli - 2007-03-12

      If you're using Accordion (left menu of test presentation app) you can enjoy with stylesheet:

      <style name="MyClass.jump" base-name="default" type="nextapp.echo2.app.Button">
        <properties>
          <property type="nextapp.echo2.app.ResourceImageReference" name="icon">
            <resource-image-reference resource="/com/myproject/view/image/jump.png" />
          </property>
        </properties>
      </style>

      If you're using classical Menu items, Roma uses Echo2 DefaultMenuModel object. Try to set icon property by stylesheet. Something like:

      <style name="MyClass.jump" base-name="default" type="nextapp.echo2.extras.app.menu.DefaultMenuModel">
        <properties>
          <property type="nextapp.echo2.app.ResourceImageReference" name="icon">
            <resource-image-reference resource="/com/myproject/view/image/jump.png" />
          </property>
        </properties>
      </style>

      Ciao,
      Luca

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.