How to set the background picture to static?

I want my background image to be static, so the background image does not move when I scroll the vertical field Manager. no idea how this is possible?

UPS... my bad

I can solve it...

to set the background image on full screen

and the setextend field to see the height of the value

Tags: BlackBerry Developers

Similar Questions

  • How to set the background Transparent

    Hi all

    I'm very new to blackberry development, can someone tell me how to set the background transparent.

    Thank you

    Kishore P.

    Use this code:
    VFM VerticalFieldManager = new VerticalFieldManager () {}
    //...
    }
    vfm.setBackground (BackgroundFactory.createSolidTransparentBackground (Color.COLOR_YOU_LIKE, 0));

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • How to set the background color of a page_item?

    I was pasting "background-color: #5CD65C" in a number of places, like the 'attributes of the HTML table cells' under the label and the tabs of the item, but get no results. Can someone tell me how to set the background color of a cell, please?

    Hi Doug,.
    One method is to add a style to your header html in page attributes, if you add the below css styling and the change of the name of the item page (#P2_FIRST_NAME) to your he should style correctly:

    Thank you

    Paul

  • How to set the background image in the window title?

    Hello

    I am a beginner in flex. I use Flex 4.

    Can someone give me some advice on how to set the background image in the title window?

    Is it possible to do?

    Thank you.

    Hello

    Check the code in the example below


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >
       
           
       

       
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";

    s | {BorderContainer
    background - image: embed(source="image/wheres_the_green_rez.jpg");
    background-image-fill-mode: clip;
    }


       
           
       

    Kind regards

    Anitha

  • How to set the background color of an application in bbui.js?

    How can I set the background color of an application that uses the bbui.js?

    his does not work just to put a:

    body {
        background-color: #000000;
    }
    

    It is even easier than... just create the style or the class on your screen

  • How to set the background image on my request.

    Hi all

    I use jdev 11.1.2.4.0 version

    use case: I create mobile applications and using the skin by default 'mobileFusionFx '.

    so when I run application there show black screen as a background image on my application

    My question is how to change the background image.

    Thank you

    Manish

    Resources of the Application open-> descriptors-> ADF META - INF-> adfmf-config. XML

    Check the family skin it and use in the skin of skin-addition id attribute.

    With this way automatically all your pages will use the same background image.

    In addition, background - image: url("images/back.png");    ---> It denotes that this images folder is inside the css file. If the pictures folder is a brother to css file, use

    background-image: url("..) (' / images/back.png ');

  • Cascades: How to set the background image for the menu drop down and etc...

    Hello

    Is there an easy way to set the background image for the menu drop down and etc, current support only black as a background?

    Thank you

    Tom.

    Welcome to the forums!

    This is currently not supported unfortunately.

    I encourage you to save a feature for this request:

    https://www.BlackBerry.com/JIRA/secure/dashboard.jspa

    See you soon!

    Martin

  • How can set the background of the screen

    I was going through all the thread related to this issue in this form, but could not be a good solution. I want to set the background color of the screen (main screen) and add fields on it. I found the solution for background coloring, but not fields not displayed after staining.

    With the help of the Simulator: 7290

    Code of CELITE (and jfisher) to blackberryforums.com
    http://www.BlackBerryForums.com/developer-forum/89940-mainScreen-background-color.html

    class ExtendedCustomMainScreen extends CustomMainScreen {}
    {ExtendedCustomMainScreen()}
    Super();
    Rtf RichTextField = new RichTextField ("This is a readonly textfield", Field.READONLY);
    LabelField helloWorld = new LabelField ("Hi jfisher! ');
    Add (rtf);
    Add (helloWorld);
    }
    }

    class CustomMainScreen extends form {}

    Private VerticalFieldManager _container;

    {CustomMainScreen()}
    Super (Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR);
    setTitle ('Test');

    VerticalFieldManager internalManager = new VerticalFieldManager (Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR) {}
    {} public void paintBackground (Graphics g)
    g.Clear ();
    Color int = g.getColor ();
    g.setColor (0xc0dce0);
    g.fillRect (0, 0, Display.getWidth (), Display.getHeight ());
    g.setColor (color);
    }
    protected void sublayout (int maxWidth, maxHeight int) {}
    Field titleField = getMyTitleField();
    int titleFieldHeight = 0;
    If (titleField! = null) {}
    titleFieldHeight = titleField.getHeight ();
    }

    int displayWidth = Display.getWidth (); I would probably make these global
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight - titleFieldHeight);
    setExtent (displayWidth, displayHeight - titleFieldHeight);
    }

    };
    _container = new VerticalFieldManager (Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR);
    internalManager.add (_container);
    Super.Add (internalManager);
    }

    public void add (field) {}
    _container. Add (field);
    }

    {} private field getMyTitleField()
    Delegated official = getDelegate();
    Field titleField = null;
    try {}
    titleField = delegate.getField (0);
    }
    {} catch (IndexOutOfBoundsException ioobe)
    //
    }
    Return titleField;
    }
    }

    class MainScreenWithBackgroundMain extends UiApplication {}

    Public Shared Sub main (String [] args) {}
    MainScreenWithBackgroundMain app = new MainScreenWithBackgroundMain();
    app.enterEventDispatcher ();
    }

    {MainScreenWithBackgroundMain()}
    Screen ExtendedCustomMainScreen = new ExtendedCustomMainScreen();
    pushScreen (screen);
    }
    }

  • How to set the background color of the title?

    Generally, the title background color is black and the other area of the main screen is white. I want to set the background color of the linear gradient background as blue or something. I try the following 2 ways, but there is always a black line at the bottom of the title bar.

          Background background = BackgroundFactory
                    .createLinearGradientBackground(0x00ff0000, 0x00ff0000,
                            0x0000ff00, 0x0000ff00);
            LabelField title = new LabelField("Hello World Demo",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
            title.setBackground(background);
            setTitle(title);
    
           LabelField title = new LabelField("Hello World Demo",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            HorizontalFieldManager hrzManager = new HorizontalFieldManager() {
                protected void paintBackground(Graphics graphics) {
    
                    graphics.setBackgroundColor(0x00382B79);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
            hrzManager.add(title);
            setTitle(hrzManager);
    

    Hello

    I think that there may be a problem using the default setTilte() method.

    Have something by default, behavior with the device.

    It may be a way to customize the default title to remove the black line at the bottom of the title bar.

    But I suggest an alternative that will behave like the title bar without using the setTitle() method.

    You can use something like below to get your condition.

    import net.rim.device.api.ui.*;import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.system.*;
    
    class TestScreen extends MainScreen{
    
        private VerticalFieldManager verticalManager;    private HorizontalFieldManager hrzManager;
    
        TestScreen()     {            super(NO_VERTICAL_SCROLL);
    
            LabelField title = new LabelField("Hello World Demo",                        LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            hrzManager = new HorizontalFieldManager()         {            protected void paintBackground(Graphics graphics)             {                graphics.setBackgroundColor(0x00382B79);                graphics.clear();                super.paint(graphics);            }        };        hrzManager.add(title);        this.add(hrzManager);
    
            //rather than  adding component in the mainScreen        //add components in this verticalManager and then        // add this manager to mainScreen          verticalManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR)        {            /*              public void paint(Graphics graphics)            {                graphics.setBackgroundColor(0x00ffffff);                graphics.clear();                super.paint(graphics);            }            */                        protected void sublayout( int maxWidth, int maxHeight )            {                int width = Display.getWidth();                int height = Display.getHeight() - hrzManager.getHeight();
    
                    super.sublayout( width, height);                setExtent( width, height);            }        };
    
            ButtonField button1 = new ButtonField("Button1");        ButtonField button2 = new ButtonField("Button2");        ButtonField button3 = new ButtonField("Button3");        ButtonField button4 = new ButtonField("Button4");        ButtonField button5 = new ButtonField("Button5");
    
            verticalManager.add(button1);        verticalManager.add(button2);        verticalManager.add(button3);        verticalManager.add(button4);        verticalManager.add(button5);        this.add(verticalManager);
    
        }}
    

    Concerning

    Bika

  • How to set the background color for the Webworks Menu?

    Hi all

    I have developed a web application that uses the emulator to ripple and Blackberry Webworks SDK 2.3.1.5.In I added the Menu items on the Blackberry Menu button... It works well... It contains the background color by default for Menu (Black)... Here, I want to change the background color of the Menu... Please help me to change the background color... Thank you very much..

    With respect,

    Marimuthu_P

    I don't think that this is possible.  The WebWorks API allows you to add menu items to your application does not provide the ability to change the background color by default of the menu.

    This API is actually an extension of Java built into the SDK WebWorks.  The source code because it's open source, available here: https://github.com/blackberry/WebWorks/tree/master/api/menu/src/main/java/blackberry/ui/menu

    It is based on the Java class "MenuItem", which as you can see it does not provide methods or properties to set the color:

    http://www.BlackBerry.com/developers/docs/7.1.0api/NET/rim/device/API/UI/MenuItem.html

  • How to set the background color to the Manager?

    I'm working on JDE 4.2.1

    I have a HorizontalFieldManager with fields like this.

    HorizontalFieldManager titleManager = new HorizontalFieldManager (HorizontalFieldManager.FIELD_HCENTER);

    Bitmap image = Bitmap.getBitmapResource("images/test.png");
    BitmapField myBitmapField = new BitmapField (image);

    titleManager.add (myBitmapField);

    titleManager.add (new LabelField ("Documents"));

    MY requirement is to have the background color as blue titleManager. This titleManager is inside another Director.

    If I want to customize, how can I do it?

    Thanks for any help.

    crush paintBackground
    use graphics.setColor and graphics.fillRect to paint you like.

  • [JS SUI] How to set the background of the window?

    Hello

    I want to add the background image to Window (SUI) and add another control that on this subject.

    Is this possible?

    I found "window.orientation =" stack"", but I can't change the location of the control.

    Any ideas?

    Thank you.

    var w = new Window ("dialog", "test");
    w.orientation = 'stack';
    
    var image = File(Folder.desktop + "/test.jpg");
    w.add("image", undefined, image);
    
    var edit = w.add("edittext", undefined, "");
    edit.characters = 10; 
    
    //edit.bound = [0,0,100,100]; //The size can be changed, but location can not be changed. 
    //edit.location = [100,100];
    //edit.preferredSize = [100,100];
    
    w.show ();
    

    I think that in your original post, the limits (in the commentary part of the code) has failed because you wrote settings change. destination = [0,0,100,100]; rather than change it. bounds =...

    I find evil at ease to avoid ScriptUI autolayout all, but the following should work to place text in the desired position:

    var w = new Window("dialog", "test");
    
    // add a group with 2 elements:
    var g = w.add("group");
    var im = g.add("image");
    var et = g.add("edittext");
    
    im.image = ScriptUI.newImage(File(Folder.desktop.absoluteURI + "/IMAGES/index.png"));
    
    // set location and size for everything
    g.location = [0,0];
    g.size = im.size = im.image.size;
    im.location = [0,0];
    
    et.size = [50, 20];
    et.location = [25, 15];
    
    w.show ();
    

    Xavier

    Edit: as an alternative to the definition of the limits once and for all, you can redefine the purpose of layout for the Group:

    g.layout ={
        layout : function(){
            im.size = im.image.size;
            im.location = [0,0];
            et.size = [50, 20];
            et.location = [25, 15];
    
            g.preferredSize = im.image.size;
            },
        };
    g.layout.resize = g.layout.layout;
    

    .. something like that.

  • How to set the background color in a scene?

    I'm new to JavaFX and just started my first program of FX.  I created a FX 7.3 NetBeans project and the project runs correctly.   All the samples in the JavaFX samples download work as well.  But when I try to do something as simple as the definition of the background on my first stage color to black, I can't make it work.  I find examples and documentation telling me that what I do should work, but it's not.

    Scene = new scene (root, 300, 250, Color.BLACK);

    scene.setFill (Color.BLACK);

    primaryStage.initStyle (StageStyle.UNDECORATED);

    primaryStage.setTitle ("Hello World!");

    primaryStage.setScene (scene);

    The two lines "BOLD" are marked as errors.  Unfortunately, I can't find a way to copy the error popup text in the IDE, so I'll summarize.  The two lines are errors that say that I gave a color but paint was expected.

    Is there something that I am missing? Can it be this hard set a background color in JavaFX?

    Thank you.

    Hello. Choose your imports. You probably

    import java.awt.Color;
    

    Instead of

    import javafx.scene.paint.Color;
    
  • How to set the background of a JPanel with its previous content?

    Hello
    I have a JFrame that contains some JPanels. Off all the JPanel, a JPanel is a graphical object (Graphics g) with the paintComponent method to paint a picture of Graphics2D in this JPanel. After the complete picture, I want don't want to paint the same thing over and over again (repaint() does it for me automatically). I want to put that final image generated in the background of the JPanel.

    I have an idea, but I want to discuss. What I can do is, after you have completed the image, I can use
    BufferedImage screenShot = newRobot().createScreenCapture(rectangle);
    for the JPanel screenshot rectangle specified. After that, I can put this BufferedImage to the JPanel. Is - this way? or should he require changes?

    Thank you.

    Do not create a screenshot. Build a BufferedImage of the same size that the Group of experts and of a suitable type, get its graphics and call paintComponent (...) of the Panel with the graphics of the BufferedImage. He painted the Panel in the BufferedImage.

    Passage to Java2D for better alignment of the section.

    DB

Maybe you are looking for