Background color of the HorizontalFieldManager

Hi Forum,

I am struck in one of the problem, I want to set the background for HorizontalFieldManager and VerticalFieldManager.

Here is my code.

HorizontalFieldManager Manager = new HorizontalFieldManager (FIELD_TOP);

Bitmap homeover = Bitmap.getBitmapResource ("home_hover.png");
Bitmap homenormal = Bitmap.getBitmapResource ("home_normal.png");

homeBtn = new CustomButton (homeover, homenormal, Field.NON_FOCUSABLE);
homeBtn.setChangeListener (this);
Manager.Add (homeBtn);

Bitmap settingsover = Bitmap.getBitmapResource ("settings_hover.png");
Bitmap settingnormal = Bitmap.getBitmapResource ("settings_normal.png");
settingsBtn = new CustomButton (settingsover, settingnormal,
Field.NON_FOCUSABLE);
settingsBtn.setChangeListener (this);

Manager.Add (settingsBtn);

Manager1 VerticalFieldManager = new VerticalFieldManager)
FIELD_TOP | USE_ALL_WIDTH | FIELD_RIGHT);
Bitmap logoutsover = Bitmap.getBitmapResource ("logout_hover.png");
Bitmap logoutnormal = Bitmap.getBitmapResource ("logout_normal.png");
logoutBtn = new CustomButton (logoutsover, logoutnormal,
Field.FIELD_RIGHT | Field.NON_FOCUSABLE);
logoutBtn.setChangeListener (this);

Manager1.setbackground (BackgroundFactory
.createSolidBackground (0x00cccccc));

Manager1.Add (logoutBtn);

Manager.Add (Manager1);
Add (rightFieldManager);
Manager.Add (new SeparatorField());
Add (Manager);

/***/

The output is that it puts the bottom from Vertical Logout button located right up to my end of the settings button. It is not set the background to the 'home' button.

Please help me fixing this questions.

Thanks to the ton.

Mukesh

I did it, I just removed the bottom of vertical and horiziontal value Manager and here it works...

Tags: BlackBerry Developers

Similar Questions

  • How to change the background color of the horizontal field Manager

    How can we tell the background color of the horizontal field Manager (hfm) hanger

    If we should extend and override in ppaint, I tried

    I got color of hfm in tag I added to this

    all give me idea

    Try this:

            HorizontalFieldManager manager = new HorizontalFieldManager()
            {
                public void paint(Graphics graphics)
                {
                    graphics.setBackgroundColor(0x000000FF);//blue
                    graphics.clear();
                    super.paint(graphics);
                }
            };
    

    Concerning

    Bika

  • 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 can I change the background color of the sidebar bookmarks?

    Grayish brown (I think) background color does not work for me. I'm a little color blind and the cursor to highlight the selected tab is not enough for me to easily see contrast. I found how to change all kinds of colors in FF, but not the background color of the bookmarks bar. I would like to change the background may be blank.

    I have it! My eyes thank you very much for your help!

  • How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0

    How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0

    You can add a theme of solid color to change the color of the top of the browser window, which contains the Menu bar.

    https://addons.Mozilla.org/en-us/Firefox/themes/solid

  • background color affecting the browser of LabVIEW

    I want to use snapshots of the LabVIEW browser in some documents.  Is there a way to put the white background color of the browser?

    Earl

    Hi Earl,

    It is the great 'code capture tool' can be found here on the forum or on the LAVA.

    Just search for "CTC" to find threads like this...

  • Cannot delete the background color of the icons on the desktop in XP.

    I'm not able to remove the background color of the icons on the desktop in XP.

    I tried the following steps with no luck.

    1 Control Panel / System / Advanced / Performance tab / button settings and tick: shadows fall to use the desktop icon labels

    2. display properties-> Desktop-> Desktop Customize-> Web-> "Lock desktop items" and "my current Home Page" is not checked.

    Any suggestion would be appreciated...

    Thanks in advance.

    Naveen

    These links should help you:

    http://www.TomsHardware.com/Forum/25340-45-unable-remove-shadow-desktop-icons-Windows

    http://www.geekyard.com/OS/Windows/how-to-remove-desktop-icon-background-color/

  • is it possible to change the background color of the checkbox control?

    Hello

    Is this possible in LV to change the background color of the checkbox system? When I try to do this via the Colors property [4] I get error 1131:

    LabVIEW: You cannot use this property with this control system.
    Property name: color [4]

    No, it's what are the control systems for. They adapt to the configuration of the machine.

    Use one of the other palettes if you want to change the color.

    Ben

  • Change the fonts of the Table header, background color of the property node?

    Can I change the font size, color and the background color of the cell for any cell in a table, however, I can't seem to do it for the headers.   Is it possible to do this?

    have you tried to use an index of-1?

    Ben

  • How can I change my task bar background color and the background color of site Web

    How can I change my task bar background color and the background color of site Web

    It is white now and he won't let me see the search fields

    Hello

    Method 1: I suggest you to refer the link below which will help you change the color of your frames of windows, the start menu, the taskbar, and more.

    http://Windows.Microsoft.com/en-us/Windows7/change-the-colors-on-your-computer

    Change the colors on your computer: http://windows.microsoft.com/en-US/windows7/change-colors-on-your-computer.

    Method 2: Try the following steps, which would help you to change the background color of your Web site.

    (a) open Internet Explorer.

    (b) on the Tools menu, click Internet Options, and then click the general tab.

    (c) click on colors under appearance.

    (d) uncheck the box that says use Windows colors.

    (e) then click on background and change the color you prefer.

    General Internet Explorer Settings change: http://windows.microsoft.com/en-US/windows7/Change-Internet-Explorer-General-settings

    Hope this information is useful.

  • background color: I want to change the background color of the screen of the monitor

    I have a web image in my Office I want to change the background color of the screen of the monitor without a change in the office itself

    could you let me know how to do this?

    Thank you

    I have a web image in my Office I want to change the background color of the screen of the monitor without a change in the office itself

    could you let me know how to do this?

    Thank you

    Hello

    To change the color of the desktop background, follow these steps.

    Click on the desktop and select personalize.

    At the bottom of the window, select the color of the window.

    In the next window, select the Advanced appearance settings.

    In the element , select Office.

    Click the drop-down color 1 menu and select your favorite color. ClickApply/OK.

    I hope this helps.

    Thank you for using Windows 7

    Ronnie Vernon MVP
  • Can we change the background color of the application?

    I tried to find a way to set a global style. If I could set the background color of the entire application, it'd save me from having to apply that color on every page.

    Setting the background color of a container in a ScrollView, also reveals a white background when you "too scroll' view. I would like to eliminate it.

    Hello level32,.

    Maybe if you set a common qml file have it set on other pages, as in the example of cascadescookbookqml, available on GitHub https://github.com/blackberry/Cascades-Samples/tree/master/cascadescookbookqml

    You will find a file RecipeContainer.qml defined on the record of the Commons and all other pages using it.

    I hope this helps.

  • How to change the background color of the autoCompleteField.

    Hi all

    I used AutoCompleteField in my application. I need to change the background color of the AutoCompleteField.

    I used

    -autoCompleteField.getEditField (.setbackground) (BackgroundFactory.createSolidBackground (1644825))

    but it fills the entire in black color. It shows the black color in the middle with white edges. I need all to be black background color.

    Please someone tell me how to autoCompleteField black background?

    Thanks in advance.

            autoCompleteField.setBackground(BackgroundFactory.createSolidBackground(0x0000ff));
            XYEdges edges = new XYEdges(10,10,10,10);
            Border newBorder = BorderFactory.createRoundedBorder(edges, 0xFF0000, Border.STYLE_SOLID);
            autoCompleteField.getEditField().setBorder(newBorder);
            autoCompleteField.getEditField().setBackground(BackgroundFactory.createSolidBackground(0x00FF00));
    

    Try this for some ideas on what to change:

  • 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

  • Background color of the custom field

    Hello

    I create a custom field that is as shown in the attached display a bar graph.

    I don't want to change the background color of the field of another color. I tried to overridding method paintBackground of the field as shown below:

    protected void paintBackground(Graphics arg0) {
            arg0.setColor(Color.DARKGRAY);
            super.paintBackground(arg0);
        }
    

    but it seems to have no effect. Could someone kindly help me with this. Thanks in advance.

    Kind regards

    S.A.Norton Stanley

    Try this...

    Create a class that extends the scope and implements DrawStyle

    and override its Paint method... to set the background color

    Draw the shape you want with the graphics object and either fill the area or set the background color.

    THX

    Rabi Ray

Maybe you are looking for

  • Qosmio G40-12 s is not booting

    Recently my Qosmio G40 had a blue screen and poured out the physical memory, it took so long, I remember he stopped at 75%, then I restarted the laptop and came with the Qosmio logo, I spent my finger, certified, shows hdd1 unlocked and hdd2 unlocked

  • Save the message history

    I want to save my complete history of Skype conversations, but the information is confusing. Following the instructions, after having signed in Skype, I find not the menu 'elusive' - privacy where, supposedly, I can change the settings of the story.

  • Enable hardware virtualization?

    I have a TouchSmart IQ507 I believe, model type dual-core Core 2 Duo.  So, how can I enable hardware virtualization in the bios, because there is no option for this?  Running virtual machines is like a dog on this machine because I can't enabled hard

  • Programmable gain 7833R

    The specification for 7833R shows an input range of +/-10V for the analog input.  The function of programmable Council benefits for different ranges of entry?

  • Need help, need product key for XP sp2 reinstall XP can be done without key to sting

    Let me know... Katyana_89 Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with programs Error messages Recent changes to your computer What you have already tried to s