Creating a menu with button rollover images

Hello

I am building a menu with buttons rollover images. It is the 5 buttons, one under the other.

I built a class with a background image that changes between the development and the status of non-focus, to make the transfer. To enable the active state, I simply added a transparent gif (width setSpace to cover the entire background).

The unfocus/update works fine, but when I reached the button up or down, the transparent gif and its area becomes white...

We can see the background on the right side of the white square...

Here's the class of the button:

OK I solved this problem with the help of this thread:

http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=39506

Thank you

Tags: BlackBerry Developers

Similar Questions

  • Button Rollover image

    I would like to change the color of the text in the button image (overview). Can anyone suggest me how to do this?

    You must edit the rollover image. This is one of the many reasons why I never use image buttons (old) more because the form buttons appeared with CP6.

    You can use any image as the fill for a shape button, you can add different same text for each State and give a different style to each State. In Captivate, while for the Image buttons, you must use a graphics application (such as Photoshop) to edit the images that are used for the States.

    Turn an Image into a button - Captivate blog

  • Background video menu with buttons on the top

    Hello.

    I am trying to create a menu that has a video experience in a loop with the buttons on top of the video.

    I created a short, empty a video 1 min in the body and matter in the background of the menu by first creating a menu, then alt/slide menu empty.

    When I place a button on top of the video, the video plays more.

    Can I do so that playback of the video in the background and the buttons on the top is active?

    Thank you

    David

    I do not see, but I wonder if you need make your menu.  (File-> Render)

  • How to create a .gif with a flat image file?

    Attached is the image that I got and I'm supposed to animate the orange arrows of up and down for a .gif file. The image is a flattened jpg file so, what would be the best way to do this?

    One with and one without text...

    Yet here is the arrow...

  • How to create a no with scrolling background image

    I searched a lot on the forum and able to paint my background either by overriding methods of painting/paintBackground of the screen or the Manager. But the background is still floating, which means that when the screen scrolls down, the background goes back and white space appears.

    My question is, how do I make the fixed background image?

    Have you checked this post?

    http://supportforums.BlackBerry.com/T5/Java-development/about-background-images-and-layouts/m-p/2442...

    T

  • Do menu with video thumbnails

    I created a menu with the video thumbnail. I want the video thumbnail to use Chapter 2 on the timeline, but when the user click on the play button, I want the chronology from Chapter 1. How do I do that?

    Select the chapter marker 1.

    Move to where you want the tile to start.  Right click and choose "poster frame".

    the poster frame may appear anywhere on the timeline; the trick is to select the brand of Chapter 1.

    I don't know if the framework of Chapter 1 poster may be just above the terminal of Chapter 2; Try it!

    If transcoded already (mpg, LWA or avi that has been converted) make sure that you create the marker on a gop boundary.

  • Conditional confirm dialog with button

    Hi all

    I want to create a dialog box confirming with the "submit" button that can be triggered only if an item is not presented in this page.

    I have a checkbox element in my page called P2_LWF

    I created confirm dialog with button using the code below

    JavaScript:if (confirm ('are you sure you want to continue?')) {
    This.disabled = true; This.Value = 'Submitted...';
    doSubmit ('SUBMIT');

    When I click on the "submit" button I want to start confirming the dialogue only if P2_LWF is not checked.

    How can I make in my application?

    Kind regards
    Year s

    Year s Hi,

    Try now.
    I don't know what you mean by: "...". want to clear the max in the employee area (area report) those offer button or refresh the page. »

    BR,
    Marko Goricki
    http://apexbyg.blogspot.com/

  • [CS3] [JS] Create a menu permenently?

    Hello

    Is it possible to create the menu with the menu point permenently? I placed my script file in the scripts Panel folder in the scripts folder.

    I added a menu to the main menu bar. It works until I have shut down the Indesign.When I restart Indesign menu does not work. I've included the statement #targetengine 'session' in my JavaScript.According of the specifications that the target statement creates objects that persist until the end of the Indesign. But my question is can I create menu with menu action permenently as another menu in the menu bar as the file menu, menu Edition...

    Advice me please.

    Concerning

    Kumar

    Altogether.

    Persistent script engines are created at InDesign start-up. To do this your script has to be in a 'startup scripts' folder somewhere under the folder "Scripts" (not the Scripts Panel folder).

    .

    The best way to do it is to create a folder (MyAccount), under one, create a folder "startup scripts" and place your script in "startup scripts".

    On my site, I have (in free stuff) a sample project that is certainly more complex than you describe here; However, it shows exactly how to get the menus and popups to work.

    Concerning

    Bob

  • How to create a button in the State with two different images?

    What I mean is... I have a picture that is conveyed as a button that has not been pressed, and I also have an image that expresses the same key but this time it is pressed. Is there a way to ensure that when the button is normal I seized the image of the button upward and then make sure that when I roll on or press the Enter key, the image of the button down?

    Thank you, Ben Charter

    Hi Ben,

    Just create a Menu and with the Normal State is selected, use the fill options to fill an image in the Menu item. Select the rollover / the mouse to the bottom of the State in the States Panel, then assign an image by using the options to fill again. This is a swap of base image using normals and States of Muse down mice.

    Kind regards

    Akshay

  • I am trying to build a DVD menu, but whenever I click on the button "Toggle the display of the menu" options I get no picture and I am unable to create a menu. Can someone help me with this?

    I am trying to build a DVD menu, but whenever I click on the button "Toggle the display of the menu" options I get no picture and I am unable to create a menu. Can someone help me with this?

    You need to install the library separately:

    http://helpx.Adobe.com/Encore/using/download-library-content.html

  • Help with Acrobat js created the menu button

    I have to use a short javascript that creates a menu button. The js script is in the correct Acrobat JavaScripts folder. I use Acrobat Pro 8.1.2

    var oButObjAddSigningPage =
    {cName: "AddSignPage"}
    cEnable: «event.rc = (app.doc!» (= null)",
    cExec: "AddSigningPage()."
    cLabel: "add a signature Page."
    cTooltext: "add signature page in the current document."
    };

    Try
    {
    app.addToolButton (oButObjAddSigningPage);
    {catch (e) {console.println (e) ;}

    The AddSigningPage() function"is in the same script file.

    Problem: The button loads and displays correctly (dimmed) If Acrobat is launched. If a pfd file is then loaded the button comes alive and the function works OK.

    But button is not displayed if Acrobat is launched by clicking on a pdf file.

    Help please.

    The entrance that fits the function 'app.removeToolButton' is the name of the button of the toolbar, not has been used to create.  Try this:

    app.removeToolButton ("AddSignPage");

    The first thing you should check is the toolbar "add-on".  After loading your document, and when the toolbar button does not appear.  Right-click on an empty part of the Acrobat toolbar to display a list of all individual toobars.  Is there a bar of modules?  Is it verified?

    To determine if your folder level script has been loaded and executed, test the function created in this script.

    Run it from the console window

    AddSigningPage

    The code for the function will be returned if it is has been defined.

    To determine if your toolbar button has been loaded, run this code in the console window.

    lst var = app.listToolbarButtons)
    for (var i = 0; i)<>
    If (.cName lst [i] is "JSAppToolBar")
    Console.println (LST [i]);
    }

    the "JSAppToolBar" is the internal name of the toolbar "add-on".

    However, from what you described, it seems that if you've hit a bug.  Probably a timing issue.  What are the characteristics of this file?

    Thom Parker
    WindJack Solutions
    The source for PDF Scripting Info
    http://www.pdfScripting.com

    The Acrobat JavaScript Reference, use it early and often
    http://www.Adobe.com/devnet/Acrobat/JavaScript.html

  • How to make a menu with the button this opening fade?

    I have built a menu animated in AE and had added text that melted by layer layers/buttons > still > create button. Once I have import into Encore through hotlinks I can't connect the buttons in the menu application.  I have added a sample.

    Basically all I want is the feature of game, selection of scene and credits to be selectable after completing discoloration in @ the: 20 mark. I don't want the menu's loop.

    I tried to do a static menu (from the last image in AE) play after that, but there is an a second gap or two before this static menu plays that look just sticky. I tried this in the preview, and it made on a dvd with the same result.

    All the tutorials I've met really does not answer this question either.

    Any help would be appreciated.

    Thank you

    So you're on the right track.

    This departure for a workflow I would try if I did more menus animated.

    http://help.Adobe.com/en_US/encoredvd/4.0/WSA5513911-0AD1-440C-BDAD-2E0E806B425E.html

  • PJC button rollOver with square shape

    Hello
    1. I use forms10g
    2. I use PJC RollOver button in order to have the new feature - "button acts like a reversal of web style that can contain two images, an image that is displayed when the button is in normal state and a second image that appears when the mouse is over the button (or roll top)."
    3. it forces the button to round.
    4. How can I change button PJC rolling so that I'll get a square button or get the button without bevel?
    Thank you

    Here is the new code you can call form forms with the following for a non-borde button:

    Set_Custom_Property('BL.PB', 1, 'SET_RIGHT_MOST', 'false');
    Set_Custom_Property('BL.PB', 1, 'SET_LEFT_MOST', 'false');
    Set_Custom_Property('BL.PB', 1, 'SET_BORDER', 'false');
    Set_Custom_Property('BL.PB', 1, 'SET_BACKGROUND', 'false');
    
    package oracle.forms.demos;
    
    import java.awt.*;
    import java.awt.event.*;
    import java.net.URL;
    
    import oracle.forms.ui.VButton;
    import oracle.ewt.button.PushButton;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.properties.Property;
    
    /**
     * 

    Oracle Forms Server PJC Example

    * * This is a PJC that implements a web style Rollover image button * where the image changes when the user moves the mouse over the component. The standard Forms * oracle.forms.ui.VButton is subclassed so only the additional functionality is required * to be added. * * We register two new forms properties, IMAGE_NAME_ON and IMAGE_NAME_OFF. These properties form the * the URL of the image files that the button will display. These properties will be set by PL/SQL * trigger code or can be set by defining the LABEL of the button with the prefix [ROLLOVER] followed by * the ON inage and OFF image names separated by a comma * * @version 1.0 09/13/1999 created
    * @version 1.1 12/09/1999 modified to support 6i features to allow dynamic custom property manipulation * @version 1.2 02/20/2000 removed 6.0 stuff and renamed package to oracle.forms.demos for distribution * @version 2.0 09/24/2001 amemded for Forms 9i. Moved to the oracle.forms.demos.enhancedItems package. Made the setting of the on/off images declaritive, using the Label Property. Allowed loading from a JAR file as well as codebase. * @author Steve Button, Duncan Mills * @version 3.0 05/05/2010 add some method to paint the button without border (F. Degrelle) */ public class RolloverButton extends VButton { /** * the property registered to specify the on image to be used */ public final static ID IMAGE_NAME_ON = ID.registerProperty("IMAGE_NAME_ON"); /** * the property registered to specify the off image to be used */ public final static ID IMAGE_NAME_OFF = ID.registerProperty("IMAGE_NAME_OFF"); /** * Forms property used to indicate that we want the utility to switch * Messaging on to the Java Console so we can see what is going on */ private static final ID DEBUGMESSAGES = ID.registerProperty("DEBUGMESSAGES"); /** * Forms property used to indicate that we want the utility to switch * Messaging on to the Java Console for ALL INSTANCES of this PJC * so we can see what is going on * This will generate a LOT of messages */ private static final ID DEBUGMESSAGES_ALL = ID.registerProperty("DEBUGMESSAGES_ALL"); /** * methods added by F.D. */ private static final ID RIGHTMOST = ID.registerProperty("SET_RIGHT_MOST"); private static final ID LEFTMOST = ID.registerProperty("SET_LEFT_MOST"); private static final ID DRAWBORDER = ID.registerProperty("SET_BORDER"); private static final ID DRAWBACKGROUND = ID.registerProperty("SET_BACKGROUND"); /** * define ON */ private final int ON = 1; /** * define OFF */ private final int OFF = 0; /** * the classname used for debugging purposes * use getClass().getName(); if you want the * full package name */ private final String CLASSNAME = this.getDefaultName(); /** * the hardcoded root directory for buttons in the JAR */ private final String JARBUTTONSDIR = "/oracle/forms/demos/images/"; /** * the hardcoded button icon type in the JAR */ private final String JARBUTTONSEXT = ".gif"; /** * the name of the on image */ private String m_imageNameOn; /** * the name of the off image */ private String m_imageNameOff; /** * storage for the handler for this class */ private IHandler m_handler; /** * The codebase from which the JAR was loaded - used to locate images */ private URL m_codeBase; /** * the current state ON | OFF */ private int m_state = OFF; /** * array to hold the images used to represent the state of the button */ private Image[] m_images = { null, null }; /** * Boolean value which describes if the button is currently a rollover or * if it is a general rounded button. */ private boolean m_isRollover = false; /** * do we want to debug for this class? Set this to true to see debug messages. */ private boolean m_debug = false; /** * do we want to debug for all instances of this class? */ private static boolean m_debugAll = false; private boolean m_border = true ; private boolean m_background = true ; public RolloverButton() { super(); log("Debugging on: Creating Button Instance"); setLeftmost(true); setRightmost(false); } /** * Implementation of IView interface which provides an initialization opportunity for the component * * @param handler - message handler associated with this view. * @see oracle.forms.ui.IView */ public void init(IHandler handler) { m_handler = handler; m_codeBase = handler.getCodeBase(); super.init(handler); } /** * Implementation of IView interface which sets a requested property to a given value * If the property being set is LABEL then special processing is undertaken. * If the Label is Prefixed with the string [ROLLOVER] then the rest of the label is assumed * to be a comma separated list of the ON and OFF icon names * If the String after the rollover tag does not contain a pair e.g. no comma * then we assume that it's one of the Icons in the JAR which will be called * xxx_on and xxx_off where xxx is the supplied string. We then set up the pair for * you e.g. a label of [ROLLOVER]firstrec will cause the icons * /oracle/forms/demos/images/firstrec_on.gif and * /oracle/forms/demos/images/firstrec_off.gif to be loaded * If the label does not begin with [ROLLOVER] then we treat it a a normal text label * except that leading or trailing round brackets can be used to indicate if * that edge of the button is rounded in Oracle look and feel * * @param property property to be set. * @param value value of the property id. * @return true if the property could be set, false otherwise. * @see oracle.forms.ui.IView */ public boolean setProperty(ID property, Object value) { if (property == ID.LABEL) { log("Setting Label to " + value.toString()); String label = value.toString().trim(); if (label.equals("")) { enableRollover(); return true; } if (label.startsWith("[ROLLOVER]")) { enableRollover(); label = label.substring(10); int i = label.indexOf(","); if (i > 0) { m_imageNameOn = label.substring(0,i); m_imageNameOff = label.substring(i+1); } else { m_imageNameOn = JARBUTTONSDIR + label + "_on" + JARBUTTONSEXT; m_imageNameOff = JARBUTTONSDIR + label + "_off" + JARBUTTONSEXT; } log("Detected Image Names + ON='" + m_imageNameOn + "', OFF= '" + m_imageNameOff + "'"); loadImage(ON,m_imageNameOn); loadImage(OFF,m_imageNameOff); setImage(OFF); return true; } else { /** * If the button label does not start with the [ROLLOVER] prefix * then we regard it as a normal button except that the programmer * can control the Rounded button look in Oracle Look and Feel by * placing a round bracket at the start or the end (or both) of the * label */ if (label.startsWith("(")) { log("Rounding left edge of " + label); setLeftmost(true); label = label.substring(1); } if (label.endsWith(")")) { log("Rounding right edge of " + label); setRightmost(true); label = label.substring(0,label.length()-1); } return super.setProperty(property, label); } } else if (property == RIGHTMOST) { String s = value.toString(); if(s.equalsIgnoreCase("true")) setRightmost(true); else setRightmost(false); return true ; } else if (property == LEFTMOST) { String s = value.toString(); if(s.equalsIgnoreCase("true")) setLeftmost(true); else setLeftmost(false); return true ; } else if (property == DRAWBORDER) { String s = value.toString(); if(s.equalsIgnoreCase("true")) m_border = true; else m_border = false ; return true ; } else if (property == DRAWBACKGROUND) { String s = value.toString(); if(s.equalsIgnoreCase("true")) m_background = true; else m_background = false ; return true ; } else if (property == IMAGE_NAME_ON) { // make sure we are in rollover mode enableRollover(); log("setProperty - IMAGE_NAME_ON value=" + value.toString()); // load the requested image m_imageNameOn = (String) value; loadImage(ON,m_imageNameOn); // reset the currrently drawn image if needed setImage(ON,m_state); return true; } else if (property == IMAGE_NAME_OFF) { // make sure we are in rollover mode enableRollover(); log("setProperty - IMAGE_NAME_OFF value=" + value.toString()); // load the requested image m_imageNameOff = (String) value; loadImage(OFF,m_imageNameOff); // reset the currrently drawn image if needed setImage(OFF,m_state); return true; } else if (property == DEBUGMESSAGES) { if (value.toString().equalsIgnoreCase("true")) m_debug = true; else m_debug = false; log("Debugging " + m_debug); return true; } else if (property == DEBUGMESSAGES_ALL) { if (value.toString().equalsIgnoreCase("true")) m_debugAll = true; else m_debugAll = false; log("Debugging " + m_debugAll); return true; } else { return super.setProperty(property, value); } } /** * Implementation of IView interface which returns the value of a requested property * * @param pid the property id that represents the property to be set * @return the value of the property id * @see oracle.forms.ui.IView */ public Object getProperty(ID pid) { if ( pid == IMAGE_NAME_OFF ) { return m_imageNameOff; } else if ( pid == IMAGE_NAME_ON ) { return m_imageNameOn; } else { return super.getProperty(pid); } } /** * Loads the requested image from the Document base, loaded JAR files, * or from the Codebase * Here is a breakdown of the logic: *
      *
    1. First we check the the loaded JAR files for the images
    2. *
    3. If it's not an inbuilt image, the code then checks the * image name supplied for http or https, if that is present * then it assumes the name is a full URL and loads the image from there.
    4. *
    5. If there is no Protocol in the image name then we assume it is a * relative URL to the docbase of the machine that Forms is running on. * We also pick up the protocol, and port and re-use those
    6. *
    7. If that fails to find the image, then we search relative to the * codebase e.g. forms/java
    * * @param which the image state to set, value values ON | OFF * @param imageName the name of the image to load, including extension */ private void loadImage(int which, String imageName) { URL imageURL = null; boolean loadSuccess = false; //JAR log("Searching JAR for " + imageName); imageURL = getClass().getResource(imageName); if (imageURL != null) { log("URL: " + imageURL.toString()); try { m_images[which] = Toolkit.getDefaultToolkit().getImage(imageURL); loadSuccess = true; log("Image found: " + imageURL.toString()); } catch (Exception ilex) { log("Error loading image from JAR: " + ilex.toString()); } } else { log("Unable to find " + imageName + " in JAR"); } //DOCBASE if (loadSuccess == false) { log("Searching docbase for " + imageName); try { if (imageName.toLowerCase().startsWith("http://")||imageName.toLowerCase().startsWith("https://")) { imageURL = new URL(imageName); } else { imageURL = new URL(m_codeBase.getProtocol() + "://" + m_codeBase.getHost() + ":" + m_codeBase.getPort() + imageName); } log("Constructed URL: " + imageURL.toString()); try { m_images[which] = createImage((java.awt.image.ImageProducer) imageURL.getContent()); loadSuccess = true; log("Image found: " + imageURL.toString()); } catch (Exception ilex) { log("Error reading image - " + ilex.toString()); } } catch (java.net.MalformedURLException urlex) { log("Error creating URL - " + urlex.toString()); } } //CODEBASE if (loadSuccess == false) { log("Searching codebase for " + imageName); try { imageURL = new URL(m_codeBase, imageName); log("Constructed URL: " + imageURL.toString()); try { m_images[which] = createImage((java.awt.image.ImageProducer) imageURL.getContent()); loadSuccess = true; log("Image found: " + imageURL.toString()); } catch (Exception ilex) { log("Error reading image - " + ilex.toString()); } } catch (java.net.MalformedURLException urlex) { log("Error creating URL - " + urlex.toString()); } } if (loadSuccess == false) log("Error image " + imageName + " could not be located"); } /** * Set the image displayed to the requested image if the requested image is the current image. * Effectively does a redraw of the currently displayed image if the image is changed by the user. * @param which the image state to draw, value values ON | OFF * @param current the current state being represented by the image */ private void setImage(int which, int current) { if(which==current) setImage(which); } /** * Set the image displayed to the appropriate image depending on the user action. * * @param which the image to display, valid values ON and OFF */ private void setImage(int which) { m_state=which; if(which==ON) log("setImage ON"); else log("setImage OFF"); this.setImage(m_images[which]); this.invalidate(); } /** * Creates the mouse listener for rollover mode * Also sets the button to fully rounded */ private void enableRollover() { if (!m_isRollover) { log("Enabling Rollover"); addMouseListener(new RolloverButtonMouseAdapter()); setLeftmost(true); setRightmost(true); m_isRollover = true; } } /** * draw the button */ public void paint (Graphics g) { if(m_border) { super.paint(g) ; } else { int iW = 0, iH = 0 ; int iX = 0, iY = 0 ; if(m_images[m_state] != null) { iW = m_images[m_state].getWidth(this); iH = m_images[m_state].getHeight(this); iX = (int)((this.getBounds().width / 2) - (iW / 2)) ; iY = (int)((this.getBounds().height / 2) - (iH / 2)) ; if(m_background) { g.setColor(this.getBackground()); g.fillRect(0,0,this.getBounds().width,this.getBounds().height); } g.drawImage(m_images[m_state],iX,iY,null); } } } public void update(Graphics g) { paint(g); } /** * Utility function to print out a debug message to the Java Console * @param msg string to display, this will be prefixed with the classname of the PJC */ public void log(String msg) { if(m_debug||m_debugAll) System.out.println(CLASSNAME + ": " + msg); } /** * Private class to handle user mouse actions and to switch images when the * user moves the mouse into and out of the button object. */ class RolloverButtonMouseAdapter extends MouseAdapter { /** * User moved the mouse over the button, swap to the on image. */ public void mouseEntered(MouseEvent me) { setImage(ON); } /** * User moved the mouse out of the button, swap to the off image. */ public void mouseExited(MouseEvent me) { setImage(OFF); } } }

    François

  • How to create a horizontal Gallery with buttons?

    I can't understand how to create a way to show my photos as a horizontal Gallery with buttons to scroll (photos at left), as Elizabeth Gadd photography . Can anyone help?

    Have you looked at the standard slideshow and Lightbox widget or sought another widget "image Carousel"? It's really basic things.

    Mylenium

  • problem with text rollover button

    I created a set of buttons called file and homeRO.gif using Fireworks. I created the first with a plastic red white bold style that reads from the House. I duplicated the State and reverse the color from red to blue plastic style.  I saved then each key on the status of my case of buttons.  In dreamweaver, I insert the reversal of the image and set a file button and the button 2 for HomeRO.gif.  They work fine until I use the page properties to assign a background color to the page.  For some reason when I do this - the text on the buttons has the same color as the background of the page (with soft edges.

    How can I stop this

    PS, I don't want to export a button bearing because this causes problems when expoerting to a model.  That's why I save each button state separately

    Any help would be greatly appereciated

    Your gifs have been made for all transparent white color.

    Redo buttons on a blue background and blue make the transparent color

Maybe you are looking for