field label and text field editing in vertical field Manager

Hi, am new to the blackberry development. Developing an application in which I placed the field label and modify the field in the Manger of two vertical field and place them in a horizontal field Manager, but when run the present I don't see the label text field I see am doin BB 4.7, following is my code

LabelField name = new LabelField ("first name :")
{
public void paint (Graphics g)
{
Super.Paint (g);
g.setColor (Color.BLACK);
Do police = this.getFont (.derive(Font.DROP_SHADOW_RIGHT_EFFECT |)) Font.ENGRAVED_EFFECT, h);
this.setFont (do);
}
};
 
FirstName = new EditField ("Name", "", 25, EditField.FILTER_DEFAULT |) FIELD_RIGHT) {}
{} public void paint (Graphics g)
getManager () .invalidate ();
Do police = this.getFont () .derive (Font.DROP_SHADOW_RIGHT_EFFECT |) Font.ENGRAVED_EFFECT, h);
this.setFont (do);
g.drawRect (6, 0, (int) (Display.getWidth()/1.8), getHeight());
Super.Paint (g);
}
};
HorizontalFieldManager hrMgr = new HorizontalFieldManager();
final VerticalFieldManager vfMgr2 = new VerticalFieldManager();
VerticalFieldManager vfMgr1 = new VerticalFieldManager()
{
protected void sublayout (int width, int height)
{
int w = (int) (Display.getWidth () - vfMgr2.getPreferredWidth () - 20);
Field field;
int fieldCount;
int x = 0;
int y = 0;

fieldCount = getFieldCount();
int d = (int) ((Display.getWidth()/4.5));
for (int i = 0; i)< fieldcount;="">
{
field = getField (i);
setPositionChild (field, x, y);
layoutChild (field, w, height);
y += field.getContentHeight ();
}
setExtent (d, a);
}
};
vfMgr1.add (Name);
vfMgr2.add (FirstName);
hrMgr.add (vfMgr1);
hrMgr.add (vfMgr2);
Add (hrMgr);

The same a s job well if put a choice field of object instead of text edit field is I see the field and choice of subject field in a single line, but is not in the case of text editing field, please help me on this point, Thanhs beforehand.

Thanks for your valuable reply Mr.simon,

But I have reached my goal by adjusting the width of vertical field nursery and got a solution... These are the changes I made in my sublayout...

protected void sublayout (int width, int height)
{
                int w = (int) (Display.getWidth()/1.3);
Field field;
int fieldCount;
int x = 10;
int y = 0;

fieldCount = getFieldCount();
              int d = (int) ((Display.getWidth () / 3));
for (int i = 0; i)< fieldcount;="">
{
field = getField (i);
setPositionChild (field, x, y);
layoutChild (field, w, height);
y += field.getContentHeight ();
}
setExtent (d, a);
}
};

Tags: BlackBerry Developers

Similar Questions

  • problem in the labels and text

    Hello

    This is my first program.
    I created the new GUI with a component.
    I added a few Jtextbox and Jlabel component and I want that that each label will have textbox and then going to be new line.
    the problem that I saw all the labels and text in one place
    This is the main code
    import javax.swing.*;
    
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    
    //import GUIclass.ButtonHandler;
    
    import java.awt.event.*;
    import java.awt.*;
    import java.io.FileOutputStream;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.Hashtable;
    import java.util.LinkedHashMap;
    import java.util.Properties;
    
    
    
    
    public class FormattedTextFieldDemo extends JFrame
    {
         
         public FormattedTextFieldDemo(){
              
    //Set Title          
         super("Information Composer - Configuration");
    
         JInternalFrame iframeGen = new JInternalFrame("test1", true,true,true,true);                                   
         JPanel panelGen = new JPanel();
         rameGen.add(panelGen);
                     iframeGen.setSize(400,300);
             iframeGen.setLocation(50,350);
             iframeGen.setVisible(true);
        
    //Read File          
              file = new File();
              file.ReadFile();
              ArrayList<InputData> arr = file.GetArrInputData();
              InputData tempInp;
    //Add labels + text to general information           
              for ( int i = 0 ; i < arr.size() ; i++ )
              {
                   tempInp = arr.get(i);          
                   panelGen.add(tempInp.GetJLabel());
                   panelGen.add(tempInp.GetJTextField());     
    
              }
    
    //Set Jframe data    
              setSize(1000, 1000);
              setLocation(0,0);     
              setVisible(true);
             JDesktopPane desk = new JDesktopPane();
             desk.add(iframeSystem);
             desk.add(iframeGen);
             desk.add(iframeHana);
             desk.add(iframeCommit);
             add(desk);
              }
    
    
            
         public static void main(String[] args) 
         {
              FormattedTextFieldDemo test = new FormattedTextFieldDemo();
              test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
         }
         
           
        }
    Edited by: sabre150 may 18, 2011 04:37

    Barcode labels added to make the code more readable.

    859774 wrote:
    just to be sure that the reason for which the label and the text box in the jpane not in the correct order (which means that some in the same line) connect available to you?

    You don't have to believe me, and you don't have to read the tutorial. You can keep blunders on in the hope that someone someday will alter your code so you want. Sure it might take awhile to find a fool to do it for you; probably more time than necessary to read the tutorial but Hey - your call.

    Good bye

  • The device icon and text missing in the imaging devices Manager

    The device icon and text missing in the imaging devices Manager

    I'm running MS Vista Ultimate.

    The imaging device icon and the wording are missing in Device Manager are missing. A device is listed in the box as installed missing icon.

    The other devices in Device Manager normally appear and I can compare what is supposed to be there for another computer running the same version of windows.

    However, the device will not work and will not reinstall.

    When you try to reinstall the device an error indicates that Setup does not work and to contact the manufacturer of the device.

    Yet once, however, this happens when I try to install any imaging device.

    I'm unable to locate information about the imaging devices in the registry.

    I think that some registry entries are missing.

    It is not the missing peripheral individual. This is the section in Device Manager.

    The image error is logged:

    "Windows didn't load setup." Contact your hardware vendor. »

    This happens with any device inaging of anyone.

    Hi henrymullersr

    What imaging device do you use?

    We can try a few steps and check if it helps you.

    Try to run the hardware and devices Troubleshooter: http://windows.microsoft.com/en-US/windows7/Open-the-Hardware-and-Devices-troubleshooter

    If the result of the Troubleshoot utility is negative, then reinstall the device. And also be sure to uninstall the previous contents of the device driver by running utility windows install cleanup:

    http://download.Microsoft.com/download/e/9/d/e9d80355-7ab4-45b8-80e8-983a48d5e1bd/msicuu2.exe

    Now follow the following steps:

    1. Save the Windows Installer Cleanup Utility package on your computer

    2. right click on the Windows Installer Cleanup Utility and run as administrator

    3. follow you prompt in the installation wizard. Once completed the installation, click on the Start button

    4. click on all programs. Click on Windows Install CleanUp Utility.

    5. click on the device driver (if on list) in the list of programs.

    6. click on Remove. Click OK

    7. click exit

    Restart the computer for the changes to take effect
     
    Then try to install the device driver and check the result: http://windows.microsoft.com/en-US/windows-vista/Install-a-USB-device

    After back and let us know if it helped to solve your problem.

    Thank you and best regards,

    R uma - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Height of a VBox with label and wrapped text

    Hello

    I have a VBox with label and text wrapped inside. The sentence in the text are from an external location and load in the text. I want to know the height of the VBox after that the text was being wrapped and place inside the VBox.

    I used all the properties for VBox as getHeight(), getPrefHeight(), getMinHeight() and getMaxHeight(), but these properties give me what I want.

    Is there another property I am missing or is a short coming of VBox?

    If this is a shortcoming of VBox, what other solution do I?

    Thank you

    AA

    You can register a listener with heightProperty() of the vbox and get it when it changes.

  • Align the labels and the lovs in a proper order?

    Hello

    I have 3 panelgroupLayouts plg1 and plg2 plg3 with Halign:center and page layout: horizontal.
    Under each panelgroupLayout an output label and an af:selectOneChoice are here.
    Under plg1; label: empno
    Under plg2; label: employeeName
    Under plg1; label: empadd
    for this reason my lovs and labels are not aligned in the same line vertivally.

    How to organize these all labels and all the socs a vertical in order to make the look n feel neat?

    All suggestions will be really useful?

    Thank you.

    Then put the panelFormLayout inside the panelGroupLayout and set its halign "Center".
    Here is an example.

    
    
    
      
        
        
          
            
              
                
                
              
              
                
              
              
                
                
              
              
                
                
              
            
          
        
      
    
    
  • Manual table view - Vertical Align Textarea top and text fields

    I have a manual tabular presentation with insert, update, delete.

    The form has a check box, text fields followed by a textarea and followed by 2 other text fields.
    The text box has 4 lines x 25 characters.
    The checkbox and textfield are centered vertically in their cells.

    I want that all fields must be aligned at the top, in order to align the upper edge all fields. I don't want the check box and text fields to centered.

    I tried setting the 'atrtibutes factor' of the text fields to

    style = "" vertical-align: top; ""

    but it did not work.

    Please help.

    I put the application on the APEX. ORACLE.COM

    Workspace: RGWORK
    Username: TESTER
    Password; Temp123
    Application: OCA debugging (19173)

    Run the 46 Affiliations Page


    Robert
    http://apexjscss.blogger.com

    Hello

    Try header HTML of the page

    
    

    BR, Jari

  • Hiding a label and corresponding field in a tble with respect to form input

    Hello

    I'm trying to hide the label and the corresponding form filed on entry.

    I am able to hide the entry form file how respect but how to hide filed corresponding form label.

    Thanks in advance

    on the top of the form field, you will need to add this.

    
    your form-field which displays  rx_num
    
    
  • Average click boxes, and text entry fields are noted

    I create several CBT intended to show users how to navigate a new software. When I record, I choose the demonstration and training modes. For the part in training mode, I have several click boxes, and text entry fields. At the present time, when the user clicks on or between text, it has to click in the right place or enter the correct answer to move forward, otherwise a failure caption appears that says something to the effect of 'should have clicked here, please try again.' They try again and go to the next slide. When the training section is marked, everybody gets 100%.

    I was wondering if it is possible to create a user click in the wrong place or enter the wrong answer and still be able to advance to the next slide. So, not everyone would have a 100% automatic.

    Thank you!

    Mary

    P.S. I should also mention that I am using Captivate 4.

    Hello Mary,.

    As I wrote in my first response, simulation training is not intended to be marked. You should really start with a simulation of assessment to avoid having too many change thereafter.

    Have created a lot of assessments used in examinations (do not use an LMS, but this is not necessary) and my students would have been very happy if they could all have scored 100%.

    Enough joking. How you have configured the settings for the click boxes, text entry boxes, buttons? I give them only 1 attempt, never show failure, success, or legends of suspicion. As both actions for success or failure, I put in 'go to the next slide. The evaluation progresses so what was the action of the user, correct or incorrect. And the score will be awarded only if the user has performed the correct action. It works fine, really. If some actions need to be repeated several times, sometimes I will put the note of some of them to 0.

    Really think you can change the training simulation to work as an assessment, in the future it would be best to start with the last mode, possibly in combination with a demonstration or a training simulation.

    Does that help? My assessments are in Dutch, otherwise I could send you an example.

    Lilybiri

    PS: Be careful with the email reports, it does not always all right.

  • How can I display several rows using Horizonatal and vertical field Manager

    Hello

    can someone tell me how I can layout my screen using HorizonatalFieldManager and VerticalFieldManager.

    I want to display the image and text as below:

    Image1 Text1

    Image2 Text2

    image3 Text3

    I have try several times but she can throw the exception of unacaught,.

    can u give me some examples like him.

    I also store image by default when the url does not contain any image

    It works with FlowField but it see as below:

    image1 image2 Text2 Text1

    image3, image4 Text4 Text3

    I don't want to, I want to show as first mention.

    now I work at bb jde 4.6 and I want to support 4.6 and later

    (1) are you IllegalStateException? It's normal if you try to manipulate anything on the screen of a non-event thread stack. If it is another exception, display the details here.

    (2) for your layout, you need a separate HFM for each pair of text-image. Like this:

    VerticalFieldManager vfm = new VerticalFieldManager(VERTICAL_SCROLL ...);
    for (i = 0; i < length; ++i) {
      HorizontalFieldManager hfm = new HorizontalFieldManager();
      hfm.add(new Label(text[i]));
      hfm.add(new BitmapField(image[i]));
      vfm.add(hfm);
    }
    add(vfm);
    

    If you add all of this to a screen with "no argument" constructor (there VERTICAL_SCROLL by default), you can ignore the optimization of resources and add your HFMs directly on-screen.

  • problem with the vertical field Manager

    Hello

    My application has a screen. On this, I add a Senior Manager vertical field. I add new labelfields dynamically to this vertical field Manager.  When I give the text in the constuctor of the etiquette field, each of them is the fine display. But when I tried to draw the text to the painting, it does not appear.

    Here is my code...

    vfm = new VerticalFieldManager(VERTICAL_SCROLL | FOCUSABLE);
            for (int i = 0; i < 4; i++) {
                index = i;
                LabelField labelField = new LabelField() {
                    protected void paint(Graphics graphics) {
                        // TODO Auto-generated method stub
    //                  super.paint(graphics);
                        graphics.setColor(Color.BLACK);
                        graphics.drawText(displayString[index], 0, 0);
                    }
                };
                vfm.add(labelField);
            }
            add(vfm);
    

    Please help me find a solution.

    First of all, stop saying that it is VerticalFieldManager who has done something bad for you. It has nothing to do with it.

    You use the index in your LabelField painting method. Use paint value is the current value of the index at the time of the painting. Painting happens way after you have created all your LabelFields, when the index stopped to change and has the last value of the loop variable (in your case, it's 3).

    This, as well as LabelFields width zero (that you seem to have supported) so are the problems of your original code. Store the value of i in your LabelField somehow if you insist on using the table values. If only check out you them once and do not change them, consider creating your LabelFields with the text from this displayString table.

    Even better: as you do not use the LabelField paint, why not create a custom field received a text and paint your smileys and all? Of course, you have to implement available as well, but it's useful even when your smileys will take a different width than the corresponding symbols.

    To summarize: your current approach is bad. Take a step back, work on the design, and then implement.

  • problem with the vertical field Manager / vertical scroll

    Hello

    I've set up a screen which makes use of a vertical field Manager by using the following code:

    class Main_Menu extends MainScreen {
    
        public class FixedWidthButtonField extends ButtonField{
            private int width;
    
            FixedWidthButtonField( String label, int Width){
                super( label, Manager.FIELD_HCENTER);
                width = Width;
            }
    
            public int getPreferredWidth(){
                return width;
            }
        }
    
        public Main_Menu() {
            setTitle(new LabelField ("Main Menu Screen", Field.FIELD_HCENTER));
            setStatus(new LabelField ("Breakout Game ©", Field.FIELD_HCENTER));
            VerticalFieldManager backgroundManager = new VerticalFieldManager(Manager.USE_ALL_WIDTH|Manager.USE_ALL_HEIGHT|Manager.NO_VERTICAL_SCROLL)
            {
                protected void paint(Graphics graphics) {
                    graphics.setBackgroundColor(0x0000A2E8);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
    
            FixedWidthButtonField playButton;
            FixedWidthButtonField instructionsButton;
            FixedWidthButtonField topScoresButton;
            FixedWidthButtonField quitButton;
    
            playButton = new FixedWidthButtonField("Play",(Display.getWidth() / 2) - 80);
            instructionsButton = new FixedWidthButtonField("Instructions",(Display.getWidth() / 2) - 80);
            topScoresButton = new FixedWidthButtonField("Top Scores",(Display.getWidth() / 2) - 80);
            quitButton = new FixedWidthButtonField("Quit",(Display.getWidth() / 2) - 80) {
                protected boolean navigationClick(int status, int time)
                {
                    getScreen().close();
                    return true;
                }
            };      
    
            playButton.setMargin(40,0,0,0);
            backgroundManager.add(playButton);
            instructionsButton.setMargin(10,0,0,0);
            backgroundManager.add(instructionsButton);
            topScoresButton.setMargin(10,0,0,0);
            backgroundManager.add(topScoresButton);
            quitButton.setMargin(10,0,0,0);
            backgroundManager.add(quitButton);
    
            add(backgroundManager);
        }
    }
    

    The problem I have is that the screen scrolled down to see the empty space after the final touches, and I can't seem to overcome this problem and prevent additional scrolling. I just want the ability to scroll the 4 buttons and have a blue background on the entire screen.

    Thank you

    Just quickly, so watch migth have wrong, but if you have a good overview of this very useful article:

    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

    I think you will find that you need to add the following at the beginning of your screen manufacturer:

    Super (NO_VERTICAL_SCROLL)

  • How to get the field at any time a vertical field Manager?

    Hi guys. In the application, that I'm working on, I came across a bit of a challenge.

    Basically I have a vertical field Manager ful of custom components.

    Basically this custom components, draws the user name, some other info and pictures of the user related to their account.

    It all works very well, but what I'm trying to do is to get the exact field on the vertical field Manager at any time. You see, while it displays the image of the user, I download from a Web server (and it will display a picture by default while it is downloading). So what I'm trying to do is go to the correct custom component of the vertical field each time Manager, so I can quickly change the image is correct, once I get the correct uploaded image. The manager of vertical field is called via the standard method.

      VerticalFieldManager vfm = new VerticalFieldManager(VERTICAL_SCROLL|VERTICAL_SCROLLBAR) {
    
    protected void sublayout(int w, int h) {
        super.sublayout(480, Math.min(240, 360)); 
    
    }
    
    };
    
    for(int i=0; i< contacts.length; i++)
    {
    //Contacts is an array of my custom component. I am just calling it
    contacts because it basically is a list of contacts.
    vfm.add(contacts[i]);
    }
    
    add(vfm);
    

    Everything works well for me except a way to get the correct field on the vertical field manager. So that I can

    Run it in a contact, and then reset the image.

    Can anyone help with this?

    Thank you

    I suggest that you give to your download manager - a reference to the contact that you update, if networking is done, you can refresh it.

    except if you develop for a device of some I would be careful with the absolute values like 480 btw

  • Need help with this Vertical field Manager? It scrolls to the low n!

    I created a vertical field Manager

    public class BGManager extends VerticalFieldManager{
        public BGManager() {
            super(VerticalFieldManager.USE_ALL_WIDTH|USE_ALL_HEIGHT);
        }
        public void paint(Graphics graphics)
        {
            graphics.setBackgroundColor(Color.BLACK);
            graphics.clear();
            super.paint(graphics);
        }
    
    }
    

    I added to my screen, then I added fields in addition to this.

    It works fine, but the Manager starts to scroll down when the focus is on the last field and I'm trying to scroll down.

    He does not stop to the last topic.

    How can I fix?

    Take a look at this thread. It addresses exactly your problem with solution:

    http://supportforums.BlackBerry.com/T5/Java-development/VerticalFieldManager-with-fixed-size-scroll-...

  • Hi, while writing an email online using Firefox 3.6.3, I was using one of the "CTRL + left arrow or right" to move the cursor on the text. I must have pressed some other key because the screen has become huge - and I can't scroll vertically or horizont

    Hi, while writing an email online using Firefox 3.6.3, I was using one of the "CTRL + left arrow or right" to move the cursor on the text. I must have pressed some other key because the screen has become huge - and I can't scroll vertically or horizontally, which makes the pages of Mail of Hotmail impossible. I have connected since using the Explorer MSFT and it works very well. This problem occurs only on the page of Mail of Hotmail Live not on the home page or other.
    Could you please let me know if there is a problem with Firefox, or if you have any advice on how to restore the appearance of Hotmail in Firefox?

    This has happened

    Just once or twice

    == I'm compiling an email in Hotmail Live

    See this:
    https://support.Mozilla.com/en-us/KB/page+zoom

  • Creation of html link in label containing text and

    Hello

    I have a label and set its text with a string surrounded by html and a tags and it usually works fine but if the string contains & character so it does not display correctly.

    Is there a way to fix this?

    & is a special symbol in HTML, chek out:

    http://www.w3schools.com/tags/ref_ascii.asp

    You have to put & instead.

Maybe you are looking for