Label field do not align right

Hello

The label field is not aligining to the right. Here is my code

Container {
                        id:database_search_top_container
                        leftPadding: 20.0
                        rightPadding: 20.0
                        preferredHeight: 110.0
                        preferredWidth: 720//displayInfo.pixelSize.width
                        background: recent_container_bg.imagePaint
                        verticalAlignment: VerticalAlignment.Fill
                        horizontalAlignment: HorizontalAlignment.Fill

                        layout: StackLayout {
                            orientation : LayoutOrientation.LeftToRight
                        }
                        Label {
                            verticalAlignment: VerticalAlignment.Center
                            horizontalAlignment: HorizontalAlignment.Right
                            id:recent_label_name
                            objectName:"recent_label_name"
                            preferredWidth: 720//displayInfo.pixelSize.width
                            preferredHeight: 110.0
                            text:"Dummy Data"
                            textStyle.color: Color.White
                            textStyle.fontSize: FontSize.Large
                        }

                    }

There is a bug in the API. But you can align it to the right this way.

Container {
    id:database_search_top_container
    leftPadding: 20.0
    rightPadding: 20.0
    preferredHeight: 110.0
    preferredWidth: 720//displayInfo.pixelSize.width
    background: recent_container_bg.imagePaint
    verticalAlignment: VerticalAlignment.Fill
    horizontalAlignment: HorizontalAlignment.Fill

    layout: StackLayout {
        orientation : LayoutOrientation.LeftToRight
    }
    Label {
        verticalAlignment: VerticalAlignment.Center
        horizontalAlignment: HorizontalAlignment.Right
        id:recent_label_name
        objectName:"recent_label_name"
        preferredWidth: 720//displayInfo.pixelSize.width
        preferredHeight: 110.0
        text:"Dummy Data"
        textStyle.color: Color.White
        textStyle.fontSize: FontSize.Large

        layoutProperties: StackLayoutProperties {
            spaceQuota: 1.0
        }
        textStyle.textAlign: TextAlign.Right
    }
}

Tags: BlackBerry Developers

Similar Questions

  • button not aligned right on all resolutions

    Hi all

    I show my app logo and a button at the top of the screen. Every thing is just OK but only problm is with the key that has to b align right at a particular positiion on the right side

    The problm I face, it's that when I place the button on the desired position, is not on the same place on all handsets

    Here is my code

       public  HorizontalFieldManager getField(){
    
            HorizontalFieldManager hfmc = new HorizontalFieldManager(HorizontalFieldManager.USE_ALL_WIDTH|
                    HorizontalFieldManager.USE_ALL_HEIGHT)
            {   
    
                protected void paint(Graphics graphics) {
                    int xForLogoImg = (Display.getWidth()*4)/100;
                    graphics.drawBitmap(0, 0, imgTitleBar.getWidth(),imgTitleBar.getHeight()+5, imgTitleBar, 0, 0);
                    graphics.drawBitmap(xForLogoImg, 0, imgTitle.getWidth(), imgTitle.getHeight()+5, imgTitle, 0, 0);
                    super.paint(graphics);
                }
            };  
    
            int left = Display.getWidth() /2 +  ((Display.getWidth()*6)/100) ;
    
            btn.setMargin(0, 0, 0, left);
            hfmc.add(btn);
            return hfmc;
        }
    

    I'll be back a HFM on which my logo is drawn and button is added. I put the left margin of the button as far as I want to b

    Its OK 9800 resolution 360 X 480 but on 9780 (resolution 480 x 360) its more to the left and the resolution inc button to move to the left

    thnx in advnc to you all

    Concerning

    Have you looked at the Style Field.FIELD_RIGHT?

    It works in places and does not work in other places, everything depends on the Manager.  One place here, I am confident, is not work in HorizontalFieldManagers.  But I think it works OK in VerticalFieldManagers where the optimization of resources has USE_ALL_WIDTH.  Then try to add your touch to an optimization of resources instead of a HFM, field, FIELD_RIGHT.

    Aside from that, you are to create a client Manager.  This Manager will be call the layout button, and then ask him what is and use the width of the Manager to determine the position to set the Position of fields.  All things pretty standard Manager however quite intimidating for a beginner to Manager.

    You can find more on this in the following:

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-custom-layout-manager-for-a-screen/...

    and

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

  • JavaScript not align right

    Hello

    I was wondering if anyone can help, I am sure it is probably something obvious, but on the homepage of my site, I can't changing images box near the top of the page to align to the right of the page, so I can have my chip points to the left of it. If I align right it does not move.

    It is quite a large margin around the box, but if I change auto to 0 or a low number it seems to remove the transition effect.

    Kutbax arboreal entrepreneurs

    Can someone give me a pointer or it is locked?

    Thanks in advance.

    Try something like this:

    • Free Quotations
    • 24 hour emergency call out.
    • All employees fully NPTC Certified
    • Midlands based with national coverage
    • £10m public liability insurance.
    • Woodsman 15x Tracked Whole Tree Chipper

    And use this CSS for your slide show:

    .slideshow {
     height: 400px;
     width: 400px;
     float: right;
     margin: auto;
     overflow: hidden;
     z-index: 0;
    }
    
  • & lt; textAlign = MX:label & quot; law & quot; BUT it will not text align right

    Ok
    I work in a text editor... compiling with the command-line.
    I have the following line:
    < mx:Label id = text = "{userRequest.lastResult.xRating"t11"}" x = "745" y = "242" color = "#e48701" fontFamily = "Arial Black" fontSize = "22" textAlign = "right" / > "

    It is, she will NOT ALIGN the text to the right.

    In any case I have suggestions.

    Thank you very much!

    I noticed that you do not have a width defined for the label. My understanding is that this will make the label as big as the text that it contains.

    You may want to increase this size, or no alignment on the enclosing container.

    Paul

  • Alignment of the field does not

    Hi, I am building a user interface with Blackberry JDE 5.0 using plugin Eclipse and test the app in Blackberry 9550 Storm Simulator.

    I'm trying to align a button may be down (first left, second right).

    I try first with a single and I can not aligned at the bottom.

    ButtonField propertiesButton = new ButtonField("Propiedades",ButtonField.FIELD_RIGHT);
    

    This is the complete class code:

    import net.rim.device.api.system.Bitmap;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    
    public class SplashScreen extends MainScreen {
    
        //BitmapField splashImage=new BitmapField(Bitmap.getBitmapResource("splash_image_"+Main.getDimentions()+".png"));
        Bitmap bg=Bitmap.getBitmapResource("splash_image_"+Main.getDimentions()+".png");
    
        VerticalFieldManager verticalManager= new VerticalFieldManager(USE_ALL_WIDTH | USE_ALL_HEIGHT | VERTICAL_SCROLL | VERTICAL_SCROLLBAR);
    
        ButtonField propertiesButton = new ButtonField("Propiedades",ButtonField.FIELD_BOTTOM);
    
        public SplashScreen(){
            super();
            //SETS background image
            verticalManager.setBackground(BackgroundFactory.createBitmapBackground(bg));
            verticalManager.add(propertiesButton);
    
            //ADDS Vertical manager REQUIRED!!!!
            add(verticalManager);
        }
    
    }
    

    When I run it, it shows the background without problems and it shows the TOP button. LEFT.

    What is happening maybe?

    The only thing I can think of is the "work area" is only at the height of the button, but vertical Manager USE_ALL_HEIGHT | USE_ALL_WIDTH, and if I set the alignment as ButtonField.FIELD_RIGHT properties it shows still left.

    Any ideas?

    Thanks for your answers, I will appreciate it.

    There is a brief description of how to implement a handler custom in Manager API documentation. There is also a very informative video from RIM:

    http://www.BlackBerry.com/DevMediaLibrary/view.do?name=HowToExtendManager

    There is also a good discussion of BB here layout managers:

    http://developerlife.com/tutorials/?p=808

    Below is a link to an another nice video RIM on how to expand the screen.

  • First form field will not click

    Hi. I build my first form and for some reason the first form field does not allow the user to click in it to type. If you press the tab key, it will highlight the area and allow to type. But I would have if someone can click and type. Any thoughts on why this is happening? My address is: http://www.zooligans.net This is the first field, the full name. Here is my code. Thank you!

    < do action = "" / gdform.php "method ="post"enctype =" application/x-www-formulaires-urlencoded"name ="form"id ="form">"

    < p >

    < label for = "Name" > full name * < / label >

    < br / >

    < input name = "Name" type = "text" id = "Name" tabindex = "1" size = "65" / >

    < br / >

    < label for = "Email" > < br / >

    Email * < / label >

    < br / >

    < input name = "Email" type = "text" id = "Email" tabindex = "2" size = "65" / >

    < br / >

    < label for = "Address" > < br / >

    < / label >

    < label for 'Address' = > address < / label > *.

    < br / >

    < input name = "Address" type = "text" id = "Address" tabindex = "3" size = "65" / >

    < br / >

    < br / >

    City of < label for 'City' = > * < / label >

    < input name = "City" type = "text" id = "City" tabindex = "4" size = "32" / >

    State of < label for 'ST' = > * < / label >

    < input name = "ST" type = "text" id = "ST" tabindex = "5" size = "5" / >

    < label for "ZIP" = > ZIP * < / label >

    < input name = "ZIP" type = "text" id = "ZIP" tabindex = "6" size = "10" / >

    < br / >

    < label for = 'phone' > < br / >

    < / label >

    < label for 'Phone' = > phone < / label >

    < input name = "Phone" type = "text" id = "Phone" tabindex = "7" size = "30" / >

    < label for "Im a" = > I'm a * < / label >

    "< select name =" Im a"id =" Im a "tabindex ="8">

    Choose one of the < option > </option >

    < option value = "retailer" > detailing < / option >

    < option value = "consumer" > customers < / option >

    < / select >

    < br / >

    < label for 'Comments' = > < br / >

    Comments < br / >

    < / label >

    < = 'comments' id = cols 'comments' textarea name = "64" lines = "5" > < / textarea >

    < br / >

    < br / >

    < input name = "send" type = "submit" id = "send" onclick = "MM_validateForm (' name ',", 'R', 'Email', ","RisEmail', 'Address', ", 'R', 'City'", 'R', "ST',", 'R', 'ZIP',", 'RisNum');" return document. MM_returnValue"value ="Submit"/ >

    < br / >

    " < input name ="recipient"type ="hidden"id = 'recipient' value = ' [email protected] "/ > "

    < input name = "redirect" type = "hidden" id = "redirect" value = "thankyou.html" / > "

    < /p >

    < / make >

    There is something not quite right about the code of your pages. I have'nt discovered what yet, but I can tell you that it seems to be your footer

    who is somehow blocking the form field

    Add style = "" clear: both; "as shown below and see what is happening:"

  • When connecting on MacMini, password is auto-complete with a myriad of points and is not the right password

    When connecting on MacMini after I click on the user, the password field is auto-complete with a myriad of points and is not the right password.

    There suddenly / maybe after the most recent update 2015-008, which I installed it on 8 January 2016.

    I need to delete points, usually I can remove them by double clicking on it and pressing the delete key, but they will not simply remove by clicking in the field and using the delete key, as would be normal. Sometimes it takes a few tries to remove the points, and then I can connect.

    Does my keyboard or a virus, my usb port, the update of security or something else...?

    I use this computer without problem for a few years.

    Thank you, Kathy

    osX version 10.9.5 processor 2.3 GHz intel core 17

    First try another KB

    Next

    -Try to reset memory NVRAM/PRAM and SMC

    MacIntel: Reset of the controller (SMC) system management

    Subject of memory NVRAM and PRAM

    -Try to start safe mode

    OS x: what is Safe Boot, Safe Mode?

    -Start to recovery and repair the startup disk

    OS X: on OS X Recovery - Apple Support

    -If it is repairable reinstall the OSX

    How to reinstall OS X on your Mac - Apple Support

    -If you do not have a backup using disk utility to restore the internal drive to an external drive, so that you can try to recover the data.

    Format the boot disk and then do a fresh install of Mac OS x

  • Reference Dell v305 problem black cartridge not aligned

    my printer dell 305 said all of a sudden the black cartridge is not aligned properly (otherwise it is said to remove the Strip). If I take the cartridge and reinsert it, I get the same message. If my printer is broken or do I have to just buy a new cartridge?

    scs822,

    Do you use Dell Series 9 ink cartridges?

    If you unplug the printer from the wall and remove the brick of power for 60 seconds, this will reset the error messages that the printer. I would then plug everything back in.

    Turn on the printer.

    Open the printer (power on) and remove the Dell Series 9 black cartridge and then reinstall it. I then remove the Dell Series 9 color cartridge and reinstall it. Now, close the printer, and it will print an alignment page.

    Error messages?

    Print Cartridge black = Black (left) cartridge = color (right side)

    photo cartridge = cartridge black (left side) = color (right side)

    Dell Series 9 ink cartridges have a sensor to them that cannot be reset. Article on Dell ink cartridges filling.

    Dell Series 9 ink cartridges can be purchased at Staples, Wal-Mart or any Dell website.

    It is possible to get an ink cartridge Dell Series 9 with a bad sensor. I would take these to the place of purchase for a replacement.

    Rick

  • 6 x 4 print not aligned

    When I try to print 6 x 4 photos I get a border of 1/4 "on one side and the other side has taken off the picture 1/4".

    can any body help. It's a printer newly purchased e7520 so I'm obviously not implemented right

    ................. SoC

    Hi Rob,

    I see you have a HP Photosmart 7520 that prints off the coast of alignment in photo printing.  Are you making sure to select 4 x 6 photo and type of paper in the printer driver when you print the photo?

    You print the photo of what program?

    What is the operating system of the computer you are using with the Photosmart 7520?

    You have a memory card, which you can test with the Photosmart 7520?  If you move the photo on the memory card and plug the memory card into the printer, it will correctly print directly via the front panel of the Photosmart printer?

  • type of product key and he says that's not the right number

    I typed in the product key, but he says that's not the right number.  I checked it several times.  It's a HP Windows Vista Home Premium.

    As HP shipped computers with Windows preinstalled, it is likely that you are using the incorrect product key. The Windows product key is usually in a label in the computer chassis, while the office is usually available to a box or envelope.

  • Envy 4500: Envy 4500 does not print right

    I have and HP Envy 4500 for a month that she was fine, then all of a sudden I tried to print and no matter what I print from a site is now not printing right.  I tried to re-align the book to help... I ran a printer status report, but it has not released correctly.  I know there is a problem, but don't know how to fix... Please help.

    Can you be more specific in the description of what happens when you try to print?

    In general, the following link contains the print quality issues.  Only the where I would start, but it would be helpful to understand what the print pages look like.  Click on the link to see if one of the solutioins on this page could help describe what happens when you try to print.  Your solution may be on this page, if it's a matter of print quality.

    Print quality troubleshooting

  • How to make a LabelField align right when the text is long?

    In order to make a good LabelField aligned, I create the LabelField with style "FIELD_RIGHT and add it to a value for money, it works when the text can be displayed on a single line." But when the text is long, over a single line, it works well.

    For example, if the text is "ABDEL FARZAD", appears like this:

    It looks like aligned left

    How can I get it?

    .

    No guarantee, but instead of Field.RIGHT, try

    FIELD. USE_ALL_WIDTH | DrawStyle.RIGHT

  • Label field

    Hello

    I need a label field that when clicked should push a new screen. So I wrote a label custo field but am not able to understand how to perform the action.

    I write the code below, please tell me where I'm wrong.

    It's the customlabelField

    / public final class CustomLabelField extends LabelField {}
    public m_cKeyListener KeyListener;
    Private GlideApplication _app.
    String strCheckInURL ="";
    private int horMargin = 8; final int innerMargin = 5; / / Adding dembele January 11 for more details
    private police objBigFont = Font.getDefault () .derive (Font.BOLD, 23); Are subject
    private police objMediumFont = Font.getDefault () .derive (Font.BOLD, 17); Are subject
    private police objSubTitleFont is Font.getDefault (.derive(Font.BOLD,16));.
    private police objSmallFont = Font.getDefault () .derive (Font.BOLD, 13); Are subject
    final int fieldWidth = ((Display.getWidth (-(horMargin*3))) > 1);

    public interface KeyListener {}
    public abstract void PerformAction (CustomLabelField pCustomLabelField);

    }
    Public Sub paintBackground (Graphics g)
    {
    XYRect xyrect = this.getExtent ();
    g.setFont (objSubTitleFont);
    g.setColor (0x0060AAF0);
    g.fillRect (0, 0, xyrect.width + 450, xyrect.height + 450);
    g.setColor (Color.DARKGRAY);
    g.drawLine (0, 0, xyrect.width, 0);
    g.setColor (Color.WHITE);
    g.drawText ("more details", innerMargin, (xyrect.height > 1)-(objSubTitleFont.getHeight () > 1) ');
    g.drawText (' > ', (xyrect.width - objSubTitleFont.getAdvance (">")-innerMargin), (xyrect.height > 1)-(objSubTitleFont.getHeight () > 1));
    }
    Protected Sub layout (int width, int height) {}
    width = fieldWidth;
    Height = objSubTitleFont.GetHeight () + 14;
    Super.Layout (width, height);
    super.setExtent (width, height);
    }

    public void SetKeyListener (KeyListener pKeyListener) {}
    m_cKeyListener = pKeyListener;
    }
    {public boolean trackwheelClick (int status, int time)
    Boolean lRetVal = false;
    If (null! = m_cKeyListener) {}
    TSTC objAirportInfo = new FlightInfo();
    _APP.pushScreen (objAirportInfo);
    m_cKeyListener.PerformAction (this);
    lRetVal = true;
    }
    return lRetVal;
    }
    }

    and this cusomlabel, I add in another page, the code for this is also attached below,

    Please tell me if I am wrong anywhere, I'm new to the blackberry development, for help, it's urgent. Thank you in advance.

    VerticalFieldManager vfmMoreDetails = new VerticalFieldManager();
    CustomLabelField lfAirportInfoMoreDetails = new CustomLabelField();

    HorizontalFieldManager hfmRow2 = new HorizontalFieldManager (Manager.HORIZONTAL_SCROLL);

    hfmRow2.add (lfAirportInfoMoreDetails);

    hfmRow2.setMargin (0,0, 0, 15);

    SF SpacerField = new SpacerField (0.20);

    hfmServices.setMargin ((subTitleFont.getHeight ()) + (bigRowSpace * 3), 0, 0, 0);
    vfmServices.add (hfmServices);
    vfmServices.setMargin (0, 0, 0, 15);
    vLayout.add (vfmServices);
    vLayout.add (sf);
    vLayout.add (hfmRow2); tmp commented
    Add (vLayout);

    My requirement is clicked, the label field, more details, will take you to a new screen flight info.

    Please help me

    Hi, thanks friends, I could implement the listener of the field with the code below, and less when I removed sublayout and changed the layout, he began to work, here are the labour code

    LabelField lfMoreDetails = new LabelField "(more Details", Field.FOCUSABLE)
    {
    protected void paintBackground (Graphics g)
    {
    XYRect xyrect = this.getExtent ();

    g.setColor (0x0060AAF0);
    g.fillRect (0, 0, subTitleFont.getHeight () + 350, subTitleFont.getHeight ());
    g.setColor (0xffffff);
    g.setColor (0xffffff);
    g.setFont (subTitleFont);
    int y = bigRowSpace;
    g.drawText ("more details", 10, y, Graphics.ELLIPSIS, xyrect.width-(10 + 10) ');
    g.drawText (' > ', (xyrect.width - objSubTitleFont.getAdvance (">")-innerMargin), (xyrect.height > 1)-(objSubTitleFont.getHeight () > 1));
    y += (subTitleFont.getHeight ()) + (bigRowSpace * 2);
    }
    protected void layout (int width, int height)
    {
    width = Display.getWidth ()-(10 + 10);
    height = serviceSectionHeight;
    setExtent (width, height);
    }

    protected boolean navigationClick (int final status, time final int) {}
    net.rim.device.api.ui.UiApplication.getUiApplication () .pushScreen (new FlightInfo());

    fieldChangeNotify (0); / / See the difference here.
    Returns true;
    }

    };
    lfMoreDetails.setChangeListener (this);

  • Windows 7 Upgrade, saying that it is not the right disc

    I have the HP Windows 7 upgrade CD of 2009 and I'm trying to install it on my genuine HP laptop. First of all, I inserted the CD that is labeled insert everything first. After that everything was checked, I was then asked to insert the upgrade CD, I did, but then I received a notification that the disc I inserted is not the right disk. The CD I'm insertion is the support for Windows 7 Home Premium Upgrade, two CDs have been sent to Microsoft. Is there something I'm missing or is there a way I can work around this problem.

    Looking forward to any help, thank you.

    Note: Running Windows Vista

    Moved from Vista to install, upgrade and activate Forum.

    You try to upgrade to the wrong architecture.

    When important changes to your computer, for example an upgrade, it is always recommended that you back up your system before installing a new version of Windows. In your case, you can upgrade to Windows 7 depending on the edition and the architecture of Windows Vista, you have installed. If you are running a 32-bit version of Vista and upgrade to a 64-bit (Windows 7 edition) version, you'll have a pure make install, it is the opposite case.

    If you are using Windows Vista Home Basic or Premium consumer editions, you can only upgrade to Windows 7 Home Premium or Ultimate. In addition, you can make downgrades, which means, if you are running Windows Vista Ultimate Edition now, you cannot downgrade to Windows 7 Home Premium. You perform logical upgrades:

    Windows Vista Home Basic > Windows 7 Home Basic, Premium or Ultimate

    Windows Vista Edition Home Premium > Windows 7 Home Premium or Ultimate

    Windows Vista Business > Windows 7 Professional, enterprise or ultimate edition

    Windows Vista Business > Windows 7 Enterprise

    Windows Vista Ultimate > Windows 7 Ultimate.

    My PC running the 32-bit version or 64-bit Windows?

    http://Windows.Microsoft.com/en-us/Windows7/find-out-32-or-64-bit

  • Date field will not update

    Apex using pre-packaged "Group calendar" app I work on page 10. I updated the form to include a custom date field and added all the code to the EBA_ca_api package

    My problem is that my custom date field will not retain the value on the edition of an event. I have other custom fields that are not date fields (field numbers and text) that update without any problem...

    How can I update my date fields?

    Update:

    I am sure that the issue is somewhere in the package, the values are not updated for some reason any.

    The pre-existing app code uses this statement

    If to_char()c1.event_date_time,' DD-MON-RRRR HH:MIam ') ! = TO_CHAR ()p_event_date_time ' DD-MON-RRRR HH:MIam '( ) then

    Update EBA_ca_events

    set event_date_time = p_event_date_time

              where event_id = p_event_id ;

          end if ;


    and it works for this field when updating. I tried to use this code on my custom date field and it didn't work, so now I'm looking for something like this

    if TO_CHAR (nvl(c1.event_due_date,'0')) ! = TO_CHAR (nvl(p_event_due_date,'0')) then

    Update EBA_ca_events

    set event_due_date = p_event_due_date

               where event_id = p_event_id ;

    end if ;  -Copy the following code causes an error when you try to apply changes (not a month valid)


    Because the following code works and updates to my date no fields


    If nvl(c1.event_not1,'0')! = nvl(p_event_not1,'0') then

    Update EBA_ca_events

    Set event_not1 = p_event_not1

    where event_id = p_event_id;

    end if;

    Does the code work if I'm on the right track? -At the end of the day what I'm trying to do, it is to be able to add a date field for the application of group calendar pre-packaged on the creation form and event on page 10, and then later change this event and updated it to the database.


    Richie V wrote:

    No I did not, but do you know how to fix the error happen and allow the new field custom_date to be edited and saved in the database?

    Thereafter. The missing pieces of the puzzle were the type of the values concerned was TIMESTAMP WITH LOCAL TIMEZONE, and that type conversion had already been made in the process of page APEX. Therefore, the required code in the package:

    -- custom date code
    
    if nvl(to_char(c1.custom_date,'DD-MON-RRRR HH:MIam') , 'X')!= nvl(to_char(p_custom_date,'DD-MON-RRRR HH:MIam'), 'X')
    then
        update EBA_ca_events
        set custom_date = p_custom_date
        where event_id = p_event_id;
    end if;
    

Maybe you are looking for