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));

Tags: BlackBerry Developers

Similar Questions

  • 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 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

  • 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 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 ');

  • How to make the background transparent in EP 14?

    Have a picture to copy onto another image. How do you get the transparent background? Is there a plugin for this?

    Is there a help line just for the EP? Sought a transparent background and found Q & A the PS full, Illuminator, and other Adobe products.

    To answer the first part (make transparent white):

    1. change the background to a normal layer layer by double-clicking on it in the Palette layers and by changing the name. Simply accept the default name "Layer 0". Use the different selection tools to select the white part. In this example, I used the magic wand with the uncontrolled contiguous option and clicked on the white...

    2 remove the selection, replacing with transparency.

    3. save the file in a format that supports transparency, such as TIFF, PNG or GIF.  JPG and BMP do not support transparency.

    As for the second part (the text does), please send a screenshot showing your PSE working area and pallet layers open when you added the text.

  • How to make the background transparent?  He continues to show white.

    I'm trying to change text colors.  Once I have change the background is transparent it becomes white.  How can I fix it to make the transparent background to stay?

    It sounds as if you rasterize the text layer. In this case, before going in Edition > fill (with white?), click on the padlock at the top of the layers panel to lock the transparent area.

  • How to make the background transparent semi while keeping the text opaque

    Basically, as the title says.

    I am using a div as a container of text and I need do the slightly transparent background while keep the text with a full opacity, but am not sure how.

    Any help would be greatly appreciated.

    If more information just ask.

    Two ways to do it.  We need to make a picture of 1 x 1 saved as a PNG with transparency and which defined on the background and repeat.  This will work in IE 7 & up and all other browsers.  The other way with CSS transparency that requires a few lines in your code depending on the browser used - http://www.w3schools.com/Css/css_image_transparency.asp .

  • 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.

Maybe you are looking for