How to use two custom on one screen fields

Hello friends,

I'm trying to customize LabelField and EditField. Both performed well individually in separate projects. Now I want to put them in the same project, same screen. Please help me.

My Code is as attaché

// BBEdit field class...customized EditField

import net.rim.device.api.system.Display;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.component.EditField;

public class BBEditField extends EditField {

    public BBEditField() {
        super("","Trial");

    }

    protected void layout(int width, int height) {
        super.layout(width, height);
        setExtent(width, height);
    }

    protected void paintBackground(Graphics graphics) {
        // TODO Auto-generated method stub
           graphics.setColor(Color.BURLYWOOD);
            graphics.clear();

        super.paintBackground(graphics);
    }

}
//BBLabelField class.. customized LabelField

package mypackage;

import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.component.LabelField;

public class BBLabelField extends LabelField {
    private String text;
    private int colorOfText;

    public BBLabelField(String text, int colorOfText) {
        super(text);
        this.text = text;
        this.colorOfText = colorOfText;

    }

    protected void layout(int width, int height) {
        super.layout(width, height);
        setExtent(width, height);
    }

    protected void paintBackground(Graphics graphics) {
        graphics.setColor(colorOfText);
        graphics.clear();
        super.paintBackground(graphics);
    }

}
// Actual use of both the classes..not working well together

public final class MyScreen extends MainScreen
{
    /**
     * Creates a new MyScreen object
     */
    public MyScreen() {
        // Set the displayed title of the screen
        VerticalFieldManager vfm = new VerticalFieldManager();
        BBLabelField myLabel = new BBLabelField("dummytext",Color.BROWN);
        BBEditField editField1 = new BBEditField();

        editField1.setText("This is Non-Editable");
        editField1.setLabel("Name : ");
        editField1.setEditable(false);

        vfm.add(editField1);
        vfm.add(myLabel);

        add(vfm);

    }
}

Thank you

remove the sublayout method, it does not have something useful.

Tags: BlackBerry Developers

Similar Questions

  • How to use two external monitors with my laptop?

    I have a new Pavilion dm4-301 d cl Entertainment PC.   My OS is Windows 7.   I'm used to using two external monitors with a docking station.   This new laptop lacks a docking station.  What should I do use two external monitors?

    Certainly not without a dock, but even with laptop HP well enough docks limit you to one of the ports on the external monitor, even if there are two on the dock. We used a device called an Atlona AT-HDPIX2 which is a USB to hdmi adapter. It provides a feature of third monitor for a laptop... use the native external port of the screen and the computer screen internal, then this device gives a third control that is fully configurable to display Windows 7 interface... clone, extend, etc.. It allows a full HD resolution and is pretty responsive for games even light.  HP does not have any true docking station for your laptop.

  • How to merge two discs into one?

    I recently updated my OS to Windows XP Edition Home Premium to Windows XP Pro. One way or another I have now two drives (Local 'C' and 'E' Local drive).  When I start the computer it opens to E drive and I continually have a message that I don't have enough disk space on drive E.  How can I megre present two discs into one?  I tried to copy the contents of the C drive in drive E, but I get the message that I don't have enough space on this drive.

    Recommendations or suggestions will be appreciated.  Thank you.

    Ernie...

    Hi Ernie,.

    I suggest you to follow these steps and check if the problem persists.

    a. go to the start menu and open 'control panel '.
    b. Select the option "System and Maintenance" If you use the Control Panel view home and 'Administrative tools' If you use the "classic" view
    d. in the "Administrative Tools" section, select "format and create partitions on the disk.
    e. for users "Classic view", select "Computer management" and select "Storage". Once finished, click on "disk management".
    f. when the list of your reader, choose the one with which you want to merge your disk partitioned with (for example drive E :) and select 'Delete Volume'.)
    g. therefore, select your C: drive and the option "Extend Volume". Your computer will automatically select the empty spaces available on your hard drive and you can change them if you want to do.

    Note: Make sure that you back up the data and then remove drive E.

  • How to use two displays LCD + with ft ROLLSIGN

    Hello

    My project needs both screens to be there:

    (1) one only to display the alphanumeric text / does not require any user (Rollsign) input

    (2) to display graphics, images and gets to user input. (LCD)

    Please suggest me how this can be accomplished. I've seen tutorials for setting a unique LCD with RPi (LINK HERE ), but what I want to do is

    To attach a display simple just like that of the bus to show routes and destination. It would be a static in which no human contribution is required

    And another kind of LCD tablets. so that the user can enter their choice

    Please help me to find the correct VIEWS for types, and how can we programmed and connected to pi raspberry and if possible to the place where I can buy those as well.

    And another subsidiary issue?

    and Yes, it is possible for me to use my tablet to LCD screen

    Thank you

    Hello

    You can use the Java SE API like Jasper and the API of Google geo location on Raspberry.

    You can use JavaFX to view your screen and hide the backend, it is more related to permission configuration and the boot of linux. I suggest you to use JavaFX user interface to work with and use any regular I2C LCD to make your roll sign proof-of-concept... I believe that the time and investment to use a sign of professional roller can be a problem for you at this time.

    Due to legal issues, we can postpone the deadline for the challenge, but submit your idea with a working, same interface is not quite ready!

    Vinicius - Senger

  • How to use the Qosmio DX730 as screen

    I use All in One PC DX730 Qosmio.

    Is it possible to make the windows Start / computer to use the display as a monitor?

    Sometimes, I need to see a file on my old PC Tower and I would not have an additional screen for that - well on the DX730 is removed during this operation.

    Thank you for inform

    Hello
    your pc need a destop map grafik with an hdmi output, if there you can connect the Qosmio dx730 with your 'OLD' destop pc and use the Qosmio as a screen.

    I think it is the only possibility.

  • How to send values textbox from one screen to another screen

    Hello guys

    can anyone tell me that how can I get the value of the editField from one screen to another screen.

    Please provide the code.

    Thanks in advance

    Click on a single screen Button.of. Pass the value of the textField like this.

    class first extends MainScreen implements FieldChangedListener
    {
        public first()
        {
            ....................
            Declareation of textField and other controls.
        }
        public void fieldChanged(Field f, int context)
        {
            //on the clicking on the Button here the code
            if (f== button)
            {
                String str=textfield.getText();
                UiApplication.getUiApplication().pushScreen(new second(str))
            }
        }
    }
    
    // another screen
    
    class second extends MainScreen
    {
        public second(String str)
        {
            //Now str contain that values.
        }
    }
    

    ------------------------------------------------------------------------------------
    Kudo press to say thank you to the developer.
    Also, press accept it as a button when you got the Solution.

  • How to use two different versions of the stub of Web Services SDK files in a single project (5.5 and 6.0)

    Hello

    I have a project that uses the vSphere 5.5 management SDK (I built the stub files according to the documentation) and have these in my c# Solution. Everything works beautifully. My class files that interact with vSphere all have a use statement as follows:

    using Vim25Api;

    All fine so far.

    Now, I want to be able to provide support for a user to connect to vSphere 5.5 and 6.0 vSphere environments. I built the stub files for vSphere Management 6.0 SDK and those in my solution presented in a separate project. Each project is based on a different class library and I have each set of files for each version of vSphere stub in different NuGet packages. However, when I select to use a vSphere 5.5 connection, it seems that internally the 6.0 files stub are used, or vice versa.

    I tried to separate things out by giving the Vim25Service.dll and Vim25Service.XmlSerializers.dll files for each version of alias names (alias by default for all assemblies is "global", but I changed it to vSphere5 and vSphere6 for each version. Then at the top of each class file before all with what I'm doing:

    extern alias vSphere5;

    or

    extern alias vSphere6

    (According to what project I'm in). Then, use the using statement for each class file that interacts with vSphere using vSphere5::Vim25Api; or using vSphere6::Vim25Api; to use the files to correct/stub namespace for each version I support.

    However this still doesn't seem to work, and things seem to be getting confused upwards somehow. I take a guess that internal files make calls and somehow have crossed.

    Is it possible to use two stub version of vSphere together different files in the same project? How should I handle my script? I thought of just upgrading to use the version of vSphere 6 (I can always connect to vCenter 5.5 using these, but some of the properties on the object have changed, (for example some dynamic properties on AlarmObjects and other items have been removed and code breaks if I delete the references to the stub vSphere 5.5 files.) So, I want to keep two different versions and use each of them separately in the same solution, so I support vSphere 5.5 and vSphere 6.

    Solved - this using wsdl.exe and just by specifying a different namespace to use in the proxy class that is generated by using the /n switch.

    for example using PowerShell to build automatically, the value $VimApi and do:

    WSDL.exe/n:$ VimApi...

  • How to use my custom defiend function

    Dear all,

    I simply create a new custom set function that I send him a whole month and return name.
    The function registered successfully. and everything is ok, the newspapers are ok

    My question: how to use my @TOSTRING CDF

    the following code for the java class
    --------------------------------------------------------------------------------
    import java.lang. *;
    Import Java.util;
    import java.text.DateFormatSymbols.
    class toString {}

    public static String fromInt (int m)
    {

    return new DateFormatSymbols () .getShortMonths () [m-1];

    }

    }

    ------------------------------------------------------------------------------


    I tried the following and check syntax result successful and executed, but now


    VAR x = 2;
    'Project status' = @MEMBER (@CONCATENATE (@TOSTRING (x), '200'));


    Please advice

    Try to write a fix and check that @TOSTRING (x) is back, ex:
    DIFFICULTY (@MEMBER (@CONCATENATE (@TOSTRING (x), "200"))
    ;
    ENDFIX;

    Or

    Fix (@Member (@TOSTRING (x)))
    ;
    ENDFIX;

    You will find a line in the newspapers saying:
    Expression [@MEMBER (<>)]...

    See you soon... !!!

  • How to use a custom in OBPM jsp taglibs?

    Could someone, please, explain to me the steps on how to use a taglib custom inside OBPM 10 g with jsp?
    I created a custom taglib, it works with other projects (with jdeveloper, for example), but I'm missing something to make it work with Obpm.

    Thank you

    Make sure you copy the .tld and .jar files appropriate for the tag library in the directories for the BPM execution:

    Copy the .tld into /webapps/workspace/WEB-INF

    Copy the jar file of taglib in /webapps/workspace/WEB-INF/lib

    Make sure you restart the workspace after making the above changes. If you are using enterprise, you must rebuild and install le.war/.ear to the workspace and to redeploy.

  • How to print two images on one page?

    Can someone tell me how to print two or more images of the Photos app on a single page?  I often print on fabric and should be able to print multiple photos on a single sheet.  This would also work if I could place photos exactly an area of 8.5 "x 11".  Then I could simply make several passes with each photo in a different location.

    Early ' 08 IMac, El Capitan 10.11.2 improved IPhoto to Photos

    Select two ore more photos, and then press the combination of keys ⌘P

    In the print Panel, select cuts available and set the width and height of your photos.

  • How to make a custom text in eSign field?

    I'm doing my custom field in this format: 1234-56-7. I can't figure out how to make this happen by using a custom expression. Any advice or tips? I use a text field with custom regular expression.

    Thank you!

    Hello Lisaw31172184,

    I recommend adding three separate text fields and provide the Maximum character limit in each of them. Here is the reference for help:

    https://helpx.Adobe.com/document-cloud/KB/EchoSign-credit-card-fields.html

    Let me know if you need more information.

    -Usman

  • Using a thinkpad as one screen to another

    Hello fellow thinkpadders.

    I have a X 1 carbon, a 230 X and I'm wondering if I can connect them so that I can use one of the keyboard and the other under the screen. In other words, I wish I had one at the level of the office and the other grew up to about a foot and a half - so that I can directly sitting at a desk and not to bend my neck forward (looking down), I hit.

    Usually, I work with the X1C using a big screen in my office and is not a problem. I also have $ LT 1421 14 "Lenovo laptop screen (which is awesome) - but it's only 200 nits and on some occasions, working at my local library (where the light is quite bright), I wondered if I can simply take two computers and support a (upper level) to use as a portable screen.

    I know this sounds a little crazy, but I'm big enough, and the neck paid I feel by using these things to an office normal level makes them unusable without an external display.

    Thank you!

    Hello

    Maybe a program as Input Director, the mouse without borders, multiplicity, ShareMouse or synergy will do what you are looking for?

    Otherwise, you can always connect a Keyboard USB Lenovo ThinkPad TrackPoint system for use as input device.

    Kind regards

    Aryeh Goretsky

  • HOW TO USE TWO MONITORS WITH MY PRO TOUR

    Have a medium apple 2012 pro tour with ATI Radeon HD 5770 1024 MB graphics card. OS10.11.3 do - what I have to do to add another monitor. Using Quicken, I am frustrated by credit cards, bank accounts and source viewing .pages documents.

    MAc 577 has two mini didsplayport and a dual link DVI output = element. Just connect two monitors to the card.

    See also:

    OS x: using several screens in Mavericks - Apple Support

    The foregoing applies to other OS x versions too

  • How to print two photos on one page?

    NOW I KNOW HOW TO PRINT MULTIPLE COPIES. HOW CAN YOU GET DIFFERENT PRINT PHOTOS ON THE SAME PAGE. AS IF I WANTED TO PRINT 5 X TWO 7 PEAK. BUT THEY WERE DIFFERENT PIC.

    Hello granny1994,

    If you use Office Word, you can cut and paste on a single page and then resize the pictures.
    Or you can use the Insert option to browse photos and then paste it on the page.

    Not sure if that's what you try to do it.
    Answer please come back and let us know.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Satellite A300 - how to use two hard disks?

    My Satellite A300 came with two 200 GB hard drives (drives C and D). What is the best way to use the D drive? Now I have nothing about it. If drive C fills the computer automatically switches the D drive?

    A basic question, I know, but the manual provides no information on this subject.

    Hey Dearborn,

    > If drive C fills the computer automatically switches the D drive?
    No, D: drive will not be filled automatically.
    When installing the program, you will be asked which drive they will be installed. So you can choose between C: and D: drive.

    In general there are no rules the use of two hard disks. You can do what you want.
    In my opinion the best is if you install all the programs on C: drive (first HARD drive) and save your private files such as photos, videos, documents, etc. on drive D: (second HARD drive). Its advantage is that if you need to reinstall Windows at all times, these files on the second HARD drive will not be deleted. ;)

Maybe you are looking for

  • Linux Ubuntu drivers

    Hello I'm about to make the transition from Vista to Ubuntu. As Toshiba offers no support for Linux, I wonder if this means that I have to ask all the drivers necessary + before + I install ubuntu or Ubuntu will automatically install. I saw the post

  • W7 en Ultiboard

    In 1998, I bought the Ultiboard 5.62.0 studentversion.I'm an amateur and I use the program only 2 times per year.In Windows XP, I could use the compatibilitymodus "Windows 98/Windows ME" to use the program.I now use Windows 7 and I get the message to

  • Serial number not found

    Hi I have a HP Pavilion p6206uk desktop PC http://support.HP.com/us-en/document/c01866525 Im trying to update my bios but cant seem to find anywhere, ive uninstalled all my computer hp, so hp applications, update my bios while I don't know seems pret

  • Windows 7 except Bug dialogue

    Hi all. I use Win7 on my system to work and I ran into an annoying problem. In earlier versions of Windows, whenever I opened the dialog save - save or save slot - and I wanted to save a file with a name very similar to one already existing, I could

  • ACS4.1 UCP error?

    Hi Experts, After configuration UCP on ACS4.1, url calls to specify the user name and password, but after giving a login, it gives an error on the next page (attached). Please help me because I need to meet the project timeline. Many thanks in advanc