Center (bb10) vertically on the label text

Hi guys!

Is there a way to vertically Center the text on the label?

Suppose you have a label with heithg = 200 and I want to Center vertically.

Is this possible?

I think that there is no such thing as a valign, or almost, but if you set the height of the label on the actual height of the text you can then focus on it vertically by applying equal and the margin down (if you use layoutData) or something like

myLabel.y = (availableHeight - myLabel.height) / 2...

Note that you can not get the height of the text until the label is rendered or less placed in the display list (otherwise, it returns 0)

myLabel.validateNow();
myLabel.height = myLabel.textHeight;

My app: Get set - get up!   Get ready for the revolution snooze.

Tags: BlackBerry Developers

Similar Questions

  • How to change the label text in the search form?

    Hi all!
    JDev 11g ADFBC

    How to change the label text in the search form?

    Yes, I use af:query

    It would be based on a ViewCriteria in your VO. The labels on the request form are the same that you set in your advice to display attribute in the VO

  • OnImmediateValueChanged cursor does not update the label text by dragging.

    Consider the following:

    Container {
            layout: DockLayout {}
            Label {
                id: label
                textStyle.base: SystemDefaults.TextStyles.BigText
                verticalAlignment: VerticalAlignment.Center
                horizontalAlignment: HorizontalAlignment.Center
            }
    
            Slider {
                fromValue: 0
                toValue: 59
                value: 0
                 onImmediateValueChanged: {
                     label.text = value;
                 }
            }
        }
    

    When you drag the cursor, it does not update the text of the label smoothly. How can I achieve this?

    Found the solution!

    By mistake I used the value parameter and not immediateValue in the onImmediateValueChanged function!

  • The label text of discoloration

    Someone at - it notificed that the last bit of the text in a label has applied discoloration?

    I'm trying to disable because sometimes it can make the text difficult to read.

    He comes to taking BlackBerry selection button used on other platforms.

    If you want to adjust the text of the label, you can use textFit...

    http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__label.html#property-TextFit

  • Align to right the label text

    How to make the text inside the right side of the label aligned using c ++

    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    
    ...
    
    TextStyle rightAlignedStyle(SystemDefaults::TextStyles::bodyText());
    rightAlignedStyle.setTextAlign(TextAlign::Right);
    
    ...
    
    Label *label = Label::create()
            .textStyle(rightAlignedStyle);
    
    or
    
    label->setTextStyle(rightAlignedStyle);
    
  • How to display the required icon after the label text?

    Hello

    I use JDeveloper 11.1.1.4.

    My scenario is I < af:inputtext > with the required property = 'true '.

    Label look like,

    "* Name but I want to show as name *. . I want to show the * icon after the text of the label.

    How to achieve this in ADF...?



    Thank you...

    Hello, t..

    Yes, it is possible.

    In '', add the "styleClass" attribute For example:

    In the css file, add a new style class as follows:

    duration .requiredField

    {

    visibility: hidden;

    }

    Thank you.

    RFH.

  • The cursor position is centered vertically in the multiline text box

    When I insert a text field, resize the height so that it can accommodate several lines of text and select "Allow multiple lines", the cursor is always left-aligned, centered vertically in the text box when opened in Acrobat.

    Is there a way to force the cursor to appear in the upper left corner, enter text to display from the top of the text, rather than in the middle box?

    Hello

    You can set the alignment of the text (vertical and horizontal) in the font/palette tab.

    If you do not see in your workspace, you can select it from the Windows menu in designer LC or SHIFT + F5.

    Good luck

    Niall

    PS note that you can change the appearance of the legend and the value of the object, together or separately. This applies to the style of the police as well as paragraph settings.

  • The label text

    Hello

    I have labels, label1, label2, label3... label11.

    I want to change their texts,

    The code below does not work, can someone tell me how to change the text using the loop?

    public void init (): void
    {
    for (var i: Number = 0; i < = 10; i ++)
    {
    var str:String = "label" + i;

    Str.Text = i;
    }
    }

    Thank you

    Hello

    The reason why this does not work is that str is simply a variable of type String, it is not actually point to the label controls even if they have the chance to have the same id as the value of str.  One way to do would be to put all label controls in a table and a loop in the table:

    public var labels:Array = new Array();
    
    ...add all your labels to the array
    
    for(var i:int = 0; i < labels.length; i++)
    {
         labels[i].text = i;
    }
    

    I'm sure there are other ways to do it, but I think it looks the most like what you're trying to do in your example.

    See you soon

  • Definition of results of the label text of the indication in the ComboBox control does not

    Hi all

    I created a form of table ADF Swing. Then, in a tab of the properties of the attributes of the dialog editor of Table Bindning, I put one of the fields as a ComboBox Editor.

    When the form is lance everything is ok - this field drop downs combobox with data from another VO.

    But when I put text field of the label of the tab to control EO or VO indicators stops ComboBox works - it works as if it was default editor - textfield, i.e. it displays the value of a base table.

    The following approach is not good, but in any case, I would like to note that when I change an attribute value 'name' of the 'AttrProp' tag to that of I put in the text field of the label of the EO (the ' label'):

    <? XML version = "1.0" encoding = "UTF-8"? >
    < pageDefinition...
    ...
    < links >
    < table...
    ...
    < AttrProp name = "Label" >
    ...
    < / pageDefinition >

    at the launch of the form everything starts working again, but when I try to change this field by just clicking the value/text field the following exception is thrown:
    oracle.jbo.NoDefException: Houston-25058: definition of Curr type attribute in SomeView1 not found.

    I use JDeveloper 10.1.3.3.0 (Build JDEVADF_10.1.3.3.0_NT_070619.1129.4157), ADF - 10.1.3.41.57 business components.

    Can I kindly ask someone to address the issue?

    Thank you
    Yerzhan.

    Published by: yerzhant on 06.01.2009 01:51

    Hello

    This seems to be a bug

    Frank

  • Favicons repeat through tabs, behind the label text when you switch between tabs. 37.0.1 sometimes the Green scroll bar does not have too

    Please mention the attached JPEGS. When I switch between tabs, favicon image repeated behind the text. In some cases, the image of the vertical scrollbar is messed up, it cleared up when I click on it. -Does not appear to affect performance, simply annoying. Thank you!

    Please temporarily disable your Avast extension to see if it has to do with it.

    Try Firefox Mode without failure:

    Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that temporarily disables hardware acceleration, restores some settings and disables add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • Click the menu button

      click Help

      then select restart with disabled modules.

    If Firefox does not work, you can start Firefox in Mode safe as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the problem is not present in Firefox Safe Mode, your problem is probably caused by an extension, theme or hardware acceleration. Please follow the steps described in the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. This might help others with the same problem.

  • remove the label text border control

    How to remove the border around the text of a control label?

    Thank you...

    Go to the tools Palette and select paint labels made Transperant once for a single label, you can just click on other labels to make transperant.

  • Call functions of the label text

    I have a text that contains the names of user ("@username") and hastags ("#hashtag") and I want to run a function when one is clicked, like Twitter when you click on a username, it opens the profile page.

    I'm currently divide the text to another label every time that a user name or the hastag is found and adding a handler to tap.

    Is there another way to do it?

    Are you trying to let the user invoke Twitter itself, or have your own custom behavior?

    You can take a look at the ActiveTextHander: https://developer.blackberry.com/native/reference/cascades/bb__cascades__activetexthandler.html

  • Formatting see the upward into the report (vertical) column, the rich TEXT Editor

    I want to show the editor RTF formatting in a (vertical) column of the report... (@apex.oracle.com;) APEX 4.0 currently)
    How?
    pls see: [http://apex.oracle.com/pls/apex/f?p=38040:1 | http://apex.oracle.com/pls/apex/f?p=38040:1]-after selecting the workshop Nov 10 in Hamburg, the long description is shown below - but the RTF editor line breaks are ignored (;-(-)
    I used report region, option 1 and default: Vertical report, look 1, stripped HTML: Yes and no to make no difference.
    A tip is appreciated.
    TIA
    Bernhard

    Hi Bernard,.

    APEX 4.0 the default view behavior in a column of the report is to hide all the HTML markup to prevent XSS attacks. To get the
    old behavior back you need access to the column of the report and setting the type of view on Standard report column. After that
    It should work as expected...

    This help...?

    Best regards

    . Carsten

  • CHANGE the LABEL text

    Hello
    I have the forms 'FORM1' and 'FORM2. FORM1 is LOGIN PAGE... I want that 'when the connection of the user, the next page show username in the corner.
    so the Question is
    1. how to pass parameter to the next page... FORM2
    2 FORM2 have TEXT (not text element) which is empty... I want that when the form2 get the setting of form1 is the USER NAME, I want to write about TEXT NOTE: (NAME TEXT IS "" USER"")...

    concerning
    Sajid

    Hello

    Declare a global variable

    :global.user_name := :.;
    
    Create a text item in your form 2 and write in when-new-form-instance of form 2
    
    :. := :global.user_name
    

    You cannot change the name of the text.

    It will be useful.

    Check the answer as useful / OK, if this can help you

    Carole

  • Large label text is the default

    When I add a control or indicator of the FP, the label text is large by default.

    It wasn't like this before. How can I reset the default text size?

    Tools/Options/Environment/Fonts

    And check the drop-down list of fonts

Maybe you are looking for

  • Follow-up short question to my earlier one.

    Re; the backup drive you helped create; It turns out about 40 GB was the BONE upward while 16-20 concerts were a backup boot disc. My question is this: since both are on the same key of 64 gig and the bone was 1 image, if I ever use the return to the

  • Battery for P50t-A-129 Sateliite

    Hello everyone, I'm looking for a new battery for my Toshiba Satellite Notebook P50t-A-129, but I couldn't find the right on the web page of Toshiba. Anyone knows where I can buy a new battery for my laptop. Thanks for all the answers!

  • PCI Driver does not

    Hello I am facing problem relating to the PCI device. When I click on this driver in the Device Manager I have a message that it is not installed. On the update of the too, I get this message that windows did not find software driver for this device.

  • name of the dot net class with variant

    Hello, I'm having a problem with .NET and Labview and I am sure that you will be able to help me. I have several dll in dotNET with their class name and I need to get the name of the class programmatically. All references of dotNET go inside a varian

  • HP Pavilion G6 1160eX l: lost catalyst control center and grphics switchable

    Hi I have deleted all of the ati files in my pc and reinstalled the new amd for driver accedintly and switchable grphics lost in my pc options now I don't know what to do to restore the switchable graphics settings in my laptop or the old catalyst co