Border and background for EditField

I want to create EditField rounded, white but I use jre 4.5 Blackberry so I can't use:

myEditField..setBorder(BorderFactory.createRoundedBorder(new XYEdges(2, 2, 2, 2),  0x35586C, Border.STYLE_SOLID));

Because doesn't have class BorderFactory or border.

I tried to draw a rectangle inside the paint method:

myEditField = new EditField(){
            public void paint(Graphics g) {
                super.paint(g);
                int prevColor = g.getColor();
                g.setColor( 0xffffff);
                g.fillRoundRect(0, 0, getWidth(), getHeight(), 10, 10);
                g.setColor(prevColor);
            }
        };

I look fine, but the problem is that text inserted inside the EditField cannot be seen...

Call super.paint () after you make your bottom paint. You cover it up with the fillRoundRect. Alternatively, if you are wanting just a border, you can use drawRoundRect().

Tags: BlackBerry Developers

Similar Questions

  • How to get other themes start screen and backgrounds for Windows 8?

    Former title: how to change windows 8 start wallpaper?

    Hello

    How can I change background menu stars and their in windows 8? I know that there are some model in customize / splash screen. but I want other do and background

    Hey Amir,

    Welcome to the Microsoft Community Forums and thanks for your post about it.

    Want to know where you can get the other start screen themes and background for Windows 8 outside the themes and background images already present images in Windows 8 by default.

    Let me inform you that we will not be able to add additional themes and backgrounds for the splash screen in Windows 8. However, it is possible for the desktop interface. If you want to add backgrounds and additional desktop themes, you can visit these links and then download your favorite themes and background images.

    For desktop themes:

    http://Windows.Microsoft.com/en-us/Windows/themes

    For wallpapers

    http://Windows.Microsoft.com/en-us/Windows/wallpaper

    For more information, you can also take a look at this link:

    Customize your PC

     

    http://Windows.Microsoft.com/en-us/Windows/personalization-Gallery

    Hope this information is useful. Please get back to us, if you still have questions about the present. You can publish all your queries related to Windows on Microsoft Community Forum and we will be happy to help you.

  • Hello, I want to download a portrait on a TSHIRT. I selected the selected area appears on a mask. The of to jpeg when I download this TSHIRT, I have the white border and white background that appears. What I don't want I v

    Hi all

    I want to download a portrait on a TSHIRT. I selected the selected area that appears on a layer 1.

    I recorded this layer in jpeg

    But when I download this jpeg on the TSHIRT (site of the seller), I have the white border and white background that appears on my Tshirt.

    What I don't want, I want only the selected head... How do I do, please? Thanks for your help!

    JPEG does not allow for transparency and provides white where it appears in the saved file.

    Save a file which allows transparency (PSD, PNG. etc.)

  • ProgressIndicator in ListView's border and white background. Why?

    Hello

    If I "embed" one ProgressIndicator inside a ListView, there an ugly border and a white background. Looks like there is a TextField below the ProgressIndicator.

    Why should he behave like this and how to fix it so that the progress indicator is transparent.

    Thank you!

    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.scene.Scene;
    import javafx.scene.control.ListCell;
    import javafx.scene.control.ListView;
    import javafx.scene.control.ProgressIndicator;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    
    public class TestApp2 extends Application {
    
        public static void main(String[] args) {
            launch(args);
        }
    
        @Override
        public void start(final Stage stage) throws Exception {
    
            ListView<String> listView = new ListView<>();
            listView.setItems(FXCollections.observableArrayList("test", "test"));
            listView.setCellFactory(new Callback<ListView<String>, ListCell<String>>() {
                @Override
                public ListCell<String> call(ListView<String> param) {
                    return new ListCell<String>() {
                        @Override
                        protected void updateItem(String item, boolean empty) {
                            super.updateItem(item, empty);
                            if (!empty) {
                                setGraphic(new ProgressIndicator());
                            } else {
                                setGraphic(null);
                            }
                        }
                    };
                }
            });
            Scene scene = new Scene(listView);
            stage.setScene(scene);
            stage.show();
        }
    }
    

    Hmm. I'm also on a Mac... It is probably a transient bug in one of the first versions of 8u40. Update to solve this problem?

  • I use indesign want to make a background for a document and if someone attempts to copy the empty document will be everywhere

    I use indesign want to make a background for a document and if someone attempts to copy the empty document will be everywhere

    Copy how? On a copier? I saw controls with the Microprint than that, but I don't know if there are special requirements (I guess there's) for the installation and print program.

  • Can I make an app that records the speed of the gps in the background for iOS and android?

    So is this possible? and how? the runtime behavior accuracy and background can be exactly the same as a native application?
    Thank you

    AIR apps can perform actions in the background, subject to availability of memory and behavior of the operating system.

    You can use the standard GeoLocation APIs.

    For iOS, I ask you through this

    http://help.Adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd1867-8000.html where it tells how you can listen to geolocation in the background

  • Border color and background

    Hello

    is there a way to remove the border and the background color of an image?

    I know the funtion srw.set_background_fill_color (color) that changes the background color, but how do I remove it? Is there a value corresponding to a color "without color"?

    Also, I know that the function srw.set_background_border_color (color) that changes the color of the border, but it does not work. In help, there is the following note: "this procedure does not apply to Windows platforms because they do not support a border model. As a result, the foreground of border color is the only visible under Windows. »
    I saw the function srw.set_border_width (width) in aid, indicating 'Zero indicates no border', but it seems that this does not work with 0.
    How can I change the color of the border or remove it?

    Thank you very much

    Jordi

    It might be easier to use two frames with different color or no color and display a dynamically at run time.

  • Really nooby question about background/foreground and background/contour switch.

    Hello!

    I was recently introduced to Photoshop through work and I use it for an amount of things to many successful however recently after using a tinkering with the Brush tool and background/foreground color in the Toolbox I am unable to return to change colors of background/outline. I searched online a fair bit for all solutions to this problem, but nothing helped. Whenever I paint forms that they simply appear as colorless with no fill or stroke and just sketch it that I drew. Could someone please direct me how to change the icon of the 2 area (x button) to return to the power change and change my background/border colors? I understand that it is probably quite simple, but it feels like I hit a brick wall with a lot of sharp rusty nails sticking out it >. <

    Much love, Scoojj

    Hello and welcome! In the options bar, your vector tool is set to the path: (B) and the option of your choice is the one: (A) layers of forms

    Option (C) is used to having pixelated layers.

  • Is there a way to automatically fill bookmarks and folders of bookmarks in the toolbar and menu for a consistent view?

    The separate group of bookmarks in Firefox in the toolbar, Menu and does not sort, I always found it cumbersome to use and manage. The search for bookmarks often means I have to open each one to find a specific bookmark. I am aware of the show all bookmarks in bookmarks option > drop-down Menu (but isn't in the bookmarks bar). I know how to copy the bookmarks and folders etc. but it is hard to do every time I have bookmark. And if I add a new bookmark folder and want a consistent view, I need to copy this folder in the Menu or eitherToolbar and copy the new bookmarks in the toolbar or the Menu as well.

    Is there an add-on or option or other alterative that exists to provide that kind of capability?

    If not, maybe an adding future functionality to Firefox to eventually change the vision presented in the bookmarks bar and Bookmarks Menu so that they match and can be activated by a new option of FireFox "change the bookmark view show merged Bookmarks Toolbar + Bookmarks Menu bookmarks and folders of bookmarks in the toolbar and menu.

    Thank you very much!

    After a few edits, I found a way to accomplish what I want, and fortunately, it can be done in the application of Firefox without needing an add-on.

    I simply copy the bookmarks unordered top-level in the top-level bookmarks toolbar and the bookmarks Menu of top-level. This, combined with the convention to add all new bookmarks in the folders under Unsorted Bookmarks or Unsorted Bookmarks, provides the unified content bookmark I want across all views bookmark 3 (Unsorted, Menu, Toolbar).

    From the library page (grown by selecting from the menu of Firefox bookmarks bar > show all bookmarks), if I select Unsorted Bookmarks, copy and paste into the bookmarks toolbar and paste in the Menu bookmarks, this is what I want. I actually created a symbolic/reference/shortcut link to Unsorted Bookmarks the other two favorite places can be found.

    With Unsorted Bookmarks in the bookmarks toolbars and bookmarks Menu, any add/remove bookmarks or add/delete records or restructuring of the bookmarks under Unsorted Bookmarks directory tree is also immediately reflected in all 3 of the possible locations of bookmark (Unsorted, toolbar, Menu).

    The design and implementation of bookmarks supports this simple solution, so Bravo for designers and coders for built-in extensibility / generality which support this approach. And thanks for the posters for giving me some background and history on the bookmarks in Firefox, motivation me digging to find this solution which is quite simple and elegant.

    Thank you!

  • I need to change my font color and background color are both black

    Hello
    I chose accidentally black for my font color and background.
    Since everything is black, I can't see the text in my window from the preferences (or modules) to restore.

    Any ideas on how I could do this?

    Thank you!
    NC_P

    Thank you for the update. If you notice anything important missing, as the parameters for an add-on, you can open this prefs.old file in a text editor and probably find it in there. We'll be there if you need help in this sense.

  • Black background for Google

    Hi, you all! Since I have updated at 12.10, when using Firefox, I get a black/brown background for Google. I would like to know how to return to the classic Google homepage. Thank you!

    You use code in userContent.css or extensions like Stylish?

    It is possible that an extension of Ubuntu is the cause.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the start safe mode window or make changes.
  • Can I turn off predictive for EditField?

    I understand "Predictive entry" option can be useful to send SMS and email, but I want my application to turn off this option by program for EditFields username and password. How can I accomplish this?

    I noticed that PasswordEditField has a side effect that it does not matter what transformation (no replacement auto, no autocaps, no automatic insertion). That's what I'm looking for. Then can I somehow the defeat of its default action replaces entered with a string of asterisks?

    Use the TextField.NO_COMPLEX_INPUT style to disable entries complexes (AutoComplete) in your field.

  • to apply to the foreground and background

    I invoke the VCR from the rim of my request. I have a file Listener listens to the file system to check if a new file is added. Once the recording is done, I want to bring my own application to the top of the screen, or take the VCR in the background.

    Thus, 3 Questions:

    1. how to bring my to the forefront of the application;

    2. how to take a background of the request;

    3. If my application want to display a msg on top of the other application (eg. VCR of the rim on the top), it is possible. For example, when the battery is low, BB alerts you to a dialog box saying 'low battery, is off' on top of another application, how to display a such report on the toppest form, that is to say. This may be same on top of other applications are invoked.

    1 Application.getApplication () .requestForeground ();

    2. it is a more interesting.  To make a request in the background, you must issue the requestBackground() to this class of Application applications. It could be that the file system auditor is performed with the Video Recorder application in control, but I doubt it.  Otherwise I do not know how you will find the Application to do a requestBackground, or if you still can.

    3. Yes - you can push a global screen.  Take a look in the developer knowledge base and search for 'screens' overall for more details.  Look here for the link to the developer knowledge base, and other useful things.

    http://NA.BlackBerry.com/eng/developers/.

  • mouse without border. Ask for a security code. where can I find

    I installed mouse without border. Ask for a security code. where can I find

    Help, please

    Hi Keyna,

    Thanks for posting your query in Microsoft Community.

    I understand that after I installed the mouse without borders to ask his security code.

    1. What is the brand and model of your computer?

    Please visit the links.

    http://blogs.technet.com/b/next/archive/2011/09/09/Microsoft-garage-download-mouse-without-borders.aspx

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=35460

    Please do not hesitate to contact us if you need additional assistance. We would be happy to help you.

  • I need to create combinations of text and images for the web. How to do this in elements or do I need Photoshop for this feature?

    I need to create combinations of text and images for the web. How to do this in elements or do I need Photoshop for this feature?  Please advise!

    slynn5236 wrote:

    I need to create combinations of text and images for the web. How to do this in elements or do I need Photoshop for this feature?  Please advise!

    You can do in PSE.

    1. Do the math to see how much space you'll need on your canvas to the image and text.
    2. Navigate to the file queue > new.blank. Enter the width & height, background color, resolution 72 px / in. It is your canvas, and in the layers palette will be the background layer.
    3. Copy and paste the image. It turns on a separate layer
    4. Activate the tool move, position the image and resize if necessary
    5. Activate the text tool, and then type your text. It will be on a separate so layer
    6. Position the text.
    7. Flatten layers and go to file > save for web. I'm usually on the long side about 800 px. Don't forget to check "constrain proportions". Adjust the quality slider to suit. You will probably want the type of JPEG file for web work.

Maybe you are looking for

  • Can I switch to OSX 10.9.5 directly to Sierra.

    Can I switch to Sierra de OSX 10.9.5 no other updates between the two?  I have an iMac mid-2011.

  • problem audio iTunes 12.4

    I use iTunes 12.4.3.1 with an AMD Sempron 145 2.80 GHz, 4 GB of RAM and 129 GB free on my hard drive. Whenever I play a song, the sound stutters. Reminds me of back in the day when I want to play the music on a PC of shit and he couldn't deal with th

  • HP MFP M277 dw: scanned image is not horizontal

    Hello I have problems with scanning. The scanned image is not right, not horizontal, the image / lines slightly tilting. The right of a line that is slightly below the line on the left. Looks like the book was a little twisted, but it's not. The left

  • Satellite A110 restarts automatically after each stop

    Hello! I have the following problem:When to stop the system, my laptop while first goes off completely, as you wish, but 2 seconds later, he again. His behavior differs from a usual restart - then will not turn off, it restarts directly. In addition

  • [Help please] Intel AC radio went with the new driver.

    Someone knows how to solve this problem: http://oi59.Tinypic.com/dwqcuh.jpg