Menu buttons with image on them?

Hello

I develop a menu for my app so that I need a few buttons and when the user click on one of them, push a screen.

I have two questions!

1.

How can put image on a button.

2.

I want to place the button in the middle of the screen just like the buttons of the calculator.

I went through a thread, but support of image is not there.

CustomButton

All of the suggestions.

Try like this:

BitmapField myBitmapField = new BitmapField(myBitmap,BitmapField.FOCUSABLE)
{
   protected boolean navigationClick(int status,int time)
   {
        System.out.println("button pressed=");
        return true;
   }
};
this.add(myBitmapField);

Concerning

Bika

Tags: BlackBerry Developers

Similar Questions

  • Replace the IR Actions menu button with image

    Apex 4.2.3

    Grid reactive theme 25

    Oracle 11g

    I would like to replace the default Actions with my image menu button. Someone knows how to do this.

    Its same as this thread, the menu button replace the Actions of interactive report (Apex 4.1)

    But it does not work for me.

    Kind regards.

    Hello

    If you want to replace all button by image - how you suppose handle clicks on this image?

    If you don't want the image - you can do this in the properties of IR report:

  • No Image - Pull Down Menu list with Image

    Hello.

    I use Pull Down Menu list with Image (measure 1). but when I run the app I can't see any image. Here is the link to my app

    [http://apex.oracle.com/pls/otn/f?p=49167:1 | http://apex.oracle.com/pls/otn/f?p=49167:1]

    Sagar

    Hello Sam,.

    If you change the model from the list "Drop-down Menu with image" images appear.

    Greetings,
    Roel

    http://roelhartman.blogspot.com/

  • Replace the button with Image

    How to replace a button with an image?

    Could you please provide more details, if you are referring to a web page, you can provide the URL and let us check.

  • Buttons with images, by setting the size?

    Hello

    I use the following code to add images to the buttons. However, I got some of the buttons out of the view from the window! What can I add to make them fit on the display window?

    MORE: I want them to be on the Center vertically and horizontally. Let's say I have 15 buttons, I want 3 each line. And in the center of the screen?

    And finally, is it possible to make the button selected by default as NULL? Then, key 1 is not selected at the beginning as shown in the picture as an attachment!

    * Image attached *.

    Thanks in advance

    Code:

    public class BitmapButtonField extends ButtonField {
            private Bitmap bitmap;
            private Bitmap bitmapHighlight;
            private boolean highlighted = false;
    
            public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight) {
                this(bitmap, bitmapHighlight, ButtonField.CONSUME_CLICK|ButtonField.FIELD_HCENTER|ButtonField.FIELD_VCENTER);
            }
    
            public BitmapButtonField(Bitmap bitmap, Bitmap bitmapHighlight, long style) {
                super(style);
                this.bitmap = bitmap;
                this.bitmapHighlight = bitmapHighlight;
            }
    
            protected void layout(int width, int height) {
                    setExtent(getPreferredWidth(), getPreferredHeight());
            }
    
            public int getPreferredWidth() {
                    return bitmap.getWidth();
            }
    
            public int getPreferredHeight() {
                    return bitmap.getHeight();
            }
    
            protected void paint(Graphics graphics) {
                    super.paint(graphics);
                    int width = bitmap.getWidth();
                    int height = bitmap.getHeight();
                    Bitmap b = bitmap;
                    if (highlighted)
                        b = bitmapHighlight;
                    graphics.drawBitmap(0, 0, width, height, b, 0, 0);
            }
    }
    

    SOLVED

    I solved by:

    1 - scaling images with display:

            public int getPreferredWidth() {
                    return Display.getWidth()/6;
            }
    
            public int getPreferredHeight() {
                    return Display.getHeight()/6;
            }
    

    2 - using HorizontalFieldManager:

    HorizontalFieldManager(FIELD_HCENTER);
    

    Thank you

  • Is radio buttons with images - possible?

    Hi, I would like to create a list of radio which went from horizontally (Western characters). Before each selection, to do a picture. It's pretty easy to rig through tables/subforms when you use a low flow top, but in the interest of saving space on the form, they really need to be Western characters. Anyone know of a way to do this?

    Not that I can think of, unless they are named the same and you set a global being. Once you do this, then they act like a group of radio buttons. Another advantage to this is that you can uncheck. Radio buttons cannot be deselected when you select one, you can change to another within this group.

  • 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

  • My new Menu button that came with the last update is now gone.

    I removed the button because it bothers me thinking it would have no impact, but now I can't, because it contained the customization menu. I searched through the other options in the menu, but the only path to the customization is now hidden in the button now gone.

    Do you use the extension classic restaurateur theme?

    • You can check the settings of the extension of the CTR through the Options/preferences button on the page "Firefox/tools > Modules > Extensions.
    • You can find additional toolbar buttons and additional toolbar settings in customize (Firefox 3-bar menu button > customize)

    See also:

    In current Firefox released (29 and following), which are have a UI Australis, the orange Firefox menu button has been replaced by the three button bar of Menu of Firefox at the far right of the Navigation bar and this button is always visible, if you have the bar of menus visible or hidden
    A consequence of this situation, it is that you can no longer hide the Navigation toolbar

    • There is a star as the button next to the search bar on the Navigation toolbar to bookmark the current web page and a "Show bookmarks" button next to it to open bookmarks in a menu drop-down.
      You can find "Show all bookmarks" to open the bookmarks (library) at the bottom of the drop-down list manager
    • If bookmark you a page, then 'Bookmark this Page' in the bookmarks menu replaces it with "edit this bookmark".
    • You can make the bar visible title via the "Title bar" button at the bottom left in the palette to customize window

    It is still possible to have the bar of menus visible via the menu popup of a toolbar for menus as the file menu to print (Ctrl + P) and preview before printing and the bookmarks menu available.

  • How to change the image of menu button?

    Hello

    How can I change the image (or the 'framework of film') which appears in the menu buttons sub-chapter (those that point directly to the different movies) to Encore CS5? By dedfault, it appears the first image of the sequence which in my case is black, I start my sequences with dissolved "fade to black". So all my buttons of menu subchapter have black pictures after that. I don't want to animate, I want to know is how to choose an image from the sequence and turn it into an image of menu button.

    Thank you

    Click on the chapter marker in the timeline to make it red.

    The value of the ICT on the image of the scenario that you want to use for the button.

    Click right red chapter and put the poster frame.

    Do the same for other chapter markers.

  • Swap the menu bookmarks with the Bookmarks button 'star'.

    There are a lot of answers there to get rid of the star on the new Favorites menu button button, and I share their frustration. However, my complaint is that I don't like the star button on the left of the double button. Is there a a way to replace the star key and the menu buttons drop down? To clarify, I want to keep the double button, but I want the button drop-down menu on the left and the star key 'Bookmark this Page' on the right.

    Here is a picture also help clarify what I'm looking to move.

    http://imgur.com/CfQrJ6o

    I appreciate any help you can offer!

    It is not possible in a simple way.
    Are not two buttons, but a single button, and the star is the main button and the other button is the drop marker as you can see if you inspect the code with the DOM Inspector.

    This drop marker also has a border or box-shadow on the left, so you should have to do a lot of CSS changes to make this work correctly.

    The two swapping is easy with the code to userChrome.css:

    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    
    #bookmarks-menu-button > dropmarker {-moz-box-ordinal-group: 0 !important;}
    

    The file userChrome.css (UI) customization and userContent.css (Web sites) are located in the folder of chrome in the Firefox profile folder.

  • Cannot display the menu items when you work with images

    Hi guys, I'm Raiden.
    I have a question and a problem to solve, here's the question:
    I've developed a BB app for months and when I run my application, a main screen is displayed,
    now I see the menus by clicking on the Menu button. And there is also a button called 'image' and if I click the button on the main screen will be full of a big size image.
    But after clicking on the 'image' button, I could not see the menus by clicking on the Menu button. So, how can I display the menus when I display images?

    Note: I'm under keylistener when I display images, I don't know whether or not it affects.

    Just Peter's is very good.  Show us your code keyListener and hopefully someone will be able to tell you what to do.  Just the keyChar (.) method.

  • Problems of blackBerry Smartphones with the BBkey (also known as the menu button)

    Sometimes when I'm in an application and want to click on one of the list of the menu items (for example, delete), when I click on the menu button, which appears are some of the icons on the home page.  (I'm really tired of looking at this little Penguin...).  If I persist, I can usually get the pop-up menu option, but it's boring.  I'm sure it's a software problem.  I had this problem after a while on my first lap.  I had to replace the one because of other problems.  I used the switch device Wizard to transfer everything, so I guess he also transferred everything that is causing this issue.

    Everyone knows about this problem?  Any ideas on what to do?  I don't want to reinstall the OS - I'd rather upward with the problem.  Thank you.

    Liz

    Hi again!

    The BBKey/Menu button has two functions.

    (1) to bring up a context menu of the application, you are

    (2) to bring up the Ribbon app-switcher (a list of all your applications in the course of execution so that you can change quickly from a different application...)

    The difference is how long you hold down the key. For 1, it is a support and quick release. For 2, it is down. Sometimes it gets bad, but with practice, you'll be able to get what you want most of the time (not 100% but... I always get a wrong result sometimes).

    Hope that helps!

  • APEX 4.2 - theme 25 - model extra button with red background

    Hello

    I am relatively new to APEX and just building my first application.

    In this application I often forms with save, cancel, and delete buttons.

    While I create registration button type "to hot' and the button cancel as 'normal' I want to highlight the button on a red background. I tried several stylesheet changes, but did not get the result I want. Compatibility between browsers should stay.

    Could someone lead me to the place I need to change the css? I assumed that the addition of a new model of button (for example "button - Red") with another class in the 'Normal' model should do the trick, but I can't make it work.

    Currently, I use the following model "Normal":

    <button class="uButton_red" onclick="#JAVASCRIPT#" #BUTTON_ATTRIBUTES# id="#BUTTON_ID#" type="button"><span>#LABEL#</span></button> 
    

    But no idea what css style I should change to get a red background

    The result should look like this screenshot manipulated:

    button.jpg

    Any help is highly appreciated

    Kind regards

    Martin

    Thanks InoL. I finally managed to get a red button:

    1. create a copy of the 'Button' model (I named it "Red - button") and replace the normal template in the button definition by the following text

    
    

    2. change your default page template (in my case its 'a level tabs - No. Sidebar') and add the following lines in the Style sheet cascading - Inline:

    .uButton.uRedButton, .uRedButton.uButtonLarge {
        -moz-border-bottom-colors: none;
        -moz-border-left-colors: none;
        -moz-border-right-colors: none;
        -moz-border-top-colors: none;
        background-color: #A62D2D;
        border-color: #A62D2D #A62D2D #7E2222;
        border-image: none;
        border-style: solid;
        border-width: 1px;
        border: 1px solid #A62D2D;
        border-bottom-color: #7E2222;
    }
    
    .uButton.uRedButton span, .uRedButton.uButtonLarge span {
        -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
        background-color: #E55B5B;
        background-image: -moz-linear-gradient(center bottom , #A53131 0%, #E55B5B 75%, #F25454 100%);
        background-image: -webkit-linear-gradient(bottom, #A53131 0%,#E55B5B 75%,#F25454 100%);
        background-size: 100% auto;
        box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
        color: #fff;
        font-weight: bold;
        text-shadow: 0 -1px 0 rgba(0,0,0,0.35);
    }
    

    3. create a new button with the attributes according to

    ==> Result is just what I wanted

    Hope this helps some other institutions ;-)

    Someone at - it an idea if the joint CSS for FF and Chrome could lead to problems?

    Thank you

    Martin

  • Is it possible with CSS menu that appears when you click the menu button on a menu bar of style?

    I'm trying the menu that appears when a menu button is enabled in the style menu bar. I am able to style the menu bar and menu button in the action bar very well.

    However, I was completely unable to style from the Menu that appears.

    I asked the same question over to StackOverflow.com, but have not yet received a reply.

    Basically I have a menu that is set up as a bar:

    <MenuBar VBox.vgrow="NEVER">
      
    <menus>
      
    <Menu mnemonicParsing="true" text="_File">
      
    <items>
      
    <MenuItem mnemonicParsing="true" text="_New Project"/>
      
    <MenuItem mnemonicParsing="true" text="_Open…"/>
      
    <MenuItem mnemonicParsing="false" text="Quit"/>
      
    </items>
      
    </Menu>
      
    </menus>
    </MenuBar>

    I was completely unable to style the MenuItem or container here when they are indicated. I have dug through CSS of the skin of the Caspian Sea, but was unable to find out what anyone who specifically the. I tried to substitute the values of the ContextMenu, Menu, menu button and MenuItem that is located in the Caspian Sea, but nothing seemed to affect this menu.

    The menu is clearly inconsistent with the menu system, so why am I unable to style it?

    Isn't this possible? It will be possible in the future?

    Thank you for answer two. Unfortunately, what was proposed was not enough to solve the problem by itself. I didn't know that .menu - the point has had a child of .label who could bear the title, but that alone was not enough to correct the problem.

    Fortunately, Uluk Biy on StackOverflow.com was able to answer the question. He stressed that wanted me the property - fx-skin. I realize that I did not provide enough information here for users to come to this conclusion, so I wanted to thank you for helping with the little information you had.

    It seems that, once I've added the property - fx-skin .context-menu, I am able to style menus.

    Thanks again guys.

  • Is it possible that I can have a spindle of pinterest this button that only appears to fly into a rectangle with image fill?

    Is it possible that I can have a spindle of pinterest this button that only appears to fly into a rectangle with image fill? In any case for also not having to add each individual image, but all the photos on the page would have a?

    The code is not in the head section, but in the body section. Try to paste the code in the html body and test it again. Sick it works. I couldn't make it work for rectangle with image fill, but it works for images.

Maybe you are looking for