Highlight a label field.

I have a label field on a screen that can hold a large amount of text which will disappear from the screen, how can I make cela scrollable?

I tried to put the label in a VerticalFieldManager, but without success.

Thank you

First of all, please learn how to use the search box on the top of the screen.  If you are looking for 'LabelField' returned this thread as the first among others:

LabelField Scrollable

The thread gives a solution similar to swati srivastava's.  morpheusghost gives a slightly different resulting in almost the same visual appearance.

However, none of these solutions is perfect.

If the text in the field is greater than 2 screens (or the field Heights), jumping from the beginning to the end (that's what happens when divert you attention from the NullField first to the last NullField) never allow see her in the middle of your LabelField.  Consider using a TextField for longer texts.  Make it FOCUSABLE and READONLY and add it to a VerticalFieldManager with VERTICAL_SCROLL (and possibly VERTICAL_SCROLLBAR).  TextField and his descendants may have the focus within the field (the cursor).  That's how you let the user scroll.

Otherwise, you can have no field focusable and manage the movements of navigation, using setVerticalScroll of the VerticalFieldManager containing your LabelField.  But that would require more code and is less intuitive.

Tags: BlackBerry Developers

Similar Questions

  • Highlight a text of label field

    Hello

    I have a label field that is added inside the VerticalFieldManager I have set the length and height of the label field in which area I want to display the text.

    now, I want my text to scroll inside the labelfield.

    Here is my code please help...

    VerticalFieldManager vf = new VerticalFieldManager (Manager.VERTICAL_SCROLL);

    LabelField history = new LabelField (story_data.elementAt (0) m:System.NET.SocketAddress.ToString (), FIELD_HCENTER |) FOCUSABLE) {}
    {} public void paint (graphics net.rim.device.api.ui.Graphics)
    graphics.setColor (Color.BLACK);
    graphics.setFont (net.rim.device.api.ui.Font.getDefault () .derive (net.rim.device.api.ui.Font.BOLD, 10));
    Super.Paint (Graphics);
    }
    Protected Sub layout (int width, int height) {}
    Super.Layout (width, height);
    this.setExtent ((MyApp.width) - 30, 300);
    }
    };
    story.setBackground (BackgroundFactory.createSolidBackground (Color.WHITE));
    story.setMargin (10, 15, 15, 15);
    story.setPadding (5, 5, 5, 5);
    story.setFont (Resize.getFirstFont ());
    VF. Add (Story);
    VerticalFieldManager temp = new VerticalFieldManager();
    Temp.Add (VF);
    Add (temp);

    Thanx

    Thanks peter... my problem is solved... Here's my code for update... VerticalFieldManager vf = VerticalFieldManager(Manager.VERTICAL_SCROLL | nouveau Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL_MASK | Manager.VERTICAL_SCROLLBAR_MASK) {' protected void sublayout (int width, int height) {super.sublayout (width, height); this.setExtent ((MyApp.width)-20, (MyApp.height)-(MyApp.height)/4) ;}};}} LabelField history = new LabelField (story_data.elementAt (0) m:System.NET.SocketAddress.ToString (), FIELD_HCENTER) {public void paint (graphics net.rim.device.api.ui.Graphics) {graphics.setColor (Color.BLACK); super.paint (graphics) ;}};} story.setBackground (BackgroundFactory.createSolidBackground (Color.WHITE)); story.setMargin (10, 15, 15, 15); story.setPadding (5, 5, 5, 5); story.setFont (Resize.getSecondFont ()); VF. Add (Story); Add (VF);

  • 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
        }
    }
    
  • 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);

  • Highlight the rows/fields Inetractive report

    What is the best way to conditionally highlight lines/one field in an interactive report? I don't want to create filters that users can see/disable

    Hello Bob,

    Before that you need to think about what happens (or should be) If a user creates his own highlight. That will interfere with the highlight you created...

    But you can set the highlighting of a field in the select statement:

    select      "DEMO_ORDER_ITEMS"."ORDER_ITEM_ID" as "ORDER_ITEM_ID",
          "DEMO_ORDER_ITEMS"."ORDER_ID" as "ORDER_ID",
          "DEMO_ORDER_ITEMS"."PRODUCT_ID" as "PRODUCT_ID",
          CASE
             WHEN UNIT_PRICE < 200 THEN
             ''
             || unit_price
             || ''
             ELSE to_char(unit_price)
             END UNIT_PRICE,
          "DEMO_ORDER_ITEMS"."QUANTITY" as "QUANTITY"
     from      "DEMO_ORDER_ITEMS" "DEMO_ORDER_ITEMS"
    

    But remember that the result of your query has now changed. If you sort on UNIT_PRICE the tag is also taken into consideration.

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

  • Custom label field - extended definition

    Hello

    I have a problem defining the scope for a custom field. I replaced the method of layout and setting, the width of the text in a horizontal field Manager.

    Custom fields are twice the width of how wide I give in the setExtent methods and layout. Kindly help me to fix it on.

    Thanks in advance.

    Hi SenthilKumar,

    Actuall problem not in the setExtend method. It's in the paint method. For highlighting and displaying the text, you used getLeft() for x position. For your information getLeft() will give the left most pixel of this field. It will not be 0.

    In your case:

    1st label displayed correctly because the method getLeft returns 0 because it was the first field in the Manager.

    2nd label was the real problem. When you call the getLeft method, it returns 65 (since the getLeft method generally returns the fields left in the (parent) Manager position), which you took as position x ie., you try to start the drawing of the 65th pixel not from 0th field of pixel (pixel 65th Manager (parent)). So overall, it seems that the 1st field of list took 130 pixels but it is false. Your painting is not correct, still you have 65 black pixels.

    Please use the following code

    protected void paint (Graphics graphics) {}
    Draw the background
    graphics.setColor (isFocus ()? _bgcolorFocus: _bgcolor);
    graphics.fillRect (0, 0, getWidth(), getHeight());

    Draw text
    graphics.setColor (isFocus ()? _fgcolorFocus: _fgcolor);
    graphics.drawText (_text, 0, 0);
    }
    It works perfectly

  • Label - field - Board labels

    Hi all

    JDev 11.1.1.5.0 & 11.1.1.6.0

    We want to build a set in page where we once again a label, the field, and then on a label.
    Ex: Max duration < field > years
    Must see this in formatting, where we have different areas. Some of them have this second label, others not.
    The farm I can uses a panellabelandmessage tag to include the second label.
              <af:panelLabelAndMessage label="Max Duration" id="plam1" showRequired="true">
                <af:inputText id="it5" required="true" showRequired="false"/>
                <f:facet name="end">
                  <af:outputLabel value="years" id="ol1"/>
                </f:facet>
              </af:panelLabelAndMessage>
            </af:panelFormLayout>
    The problem arises with the required fields. We can define the attribute showRequired of the panellabelandmessage to true, and that of the inputText to false.
    But whenever the required of the inputText property is set to true, the required icon is always shown, even if the showRequired is set to false.
    This makes the required icon is displayed twice.
    How can hide us the required icon of the inputText field?

    What are the possible solutions for this situation?

    Thank you in advance.

    Filip Huysmans.

    Filip,

    the following custom skin entry removes the icon required all input text labels so that they are defined on the component panelLabelMessage only

    AF | inputText::label. AFRequiredIconStyle {display: none}

    If you need to have more control, you can add a property styleClass as shown below

     
                
                
                  
                
              
    

    In this case, the following skin only removes this

    .noRequiredIcon af | inputText::label. AFRequiredIconStyle {display: none}

    If you need more dynamic event, use EL to set the styleClass value.

    Frank

    PS. : Is the question you may ask: why should I add the af | inputText::label to the skin if the style class determines the instance? The advantage you get from this is that it is the longets match, which means that if there are other components (no text input) that have similar requirements, you can manage them individually

  • Highlighted in a field when a condition is met

    Hello

    I have created a form that has a field that aggregates the amounts of a table.  What I want to do is to ensure that the total amount will be highlighted when it reaches a certain amount or higher (example: If the total amount of purchases reached $300.00 or more, then it will be highlighted).

    I need this so people can easily watch this form and if the amount is highlighted, they know that they must complete another form for that amount.

    I hope that makes sense...

    Hello

    I assume you are already using a calculate event, so you should be able to highlight the field in this script, something like;

    var result = NumericField1.rawValue + NumericField2.rawValue;

    If (result > 300)

    {

    this.fillColor = "255,0,0";

    }

    result;

    Remember that the result of the script calculate is the last value evaluated.

    Concerning

    Bruce

  • Highlight a text field

    An an Im easy and safe, but I have created a text field on a page that a user can enter the search criteria for a master detail report, if the user enters something in there I want to highlight the text a certain color.

    I'm looking in the report attributes but where and how to do this?

    Thank you

    Hello

    To highlight the field current, you need to place this code in all areas (the html form element attributes).

    onblur = "This.style.BackgroundColor = 'white'" onFocus ="this.style.backgroundColor =" lightyellow ";"

    Alan.

  • Disable the highlighting of the field?

    Hello

    Working on a form that will be distributed to a number of users.  The form uses a lot of scripts to highlight areas requiring attention.  The form works/shows when the built-in fields "highlight" turned off the coast (currently done manually).

    Is it possible to disable the field highlighting using a script or by changing the preferences so that when the document is opened, the form fields are not underlined?  During the test, the "highlight fields" option is enabled by default on computers of other users.  I searched the Internet and came to the following:

    Layout: Ready event

    app.runtimeHighlight = False

    This allows, and if so, where should it be entered (thankfully not all areas).


    Thank you

    The logical variable is 'false' not 'false '.

    app.runtimeHighlight = false;

    "There is ' ready Doc ' in an Acroform is a script action in LiveCycle Designer. I would like to do this a script document level, so any page of the form opens when the PDF file is opened, the action happens and happens only once.

  • issue highlighting text simple field

    Hi guys

    I have a form with a text field where the user enters their initials.

    In order to develop the area to the attention of users, I highlighted the portion of the field where the user would type.

    When they click on the text field, I would like that this highlighting is removed.

    This can be done?

    Thank you

    Hello

    Yes, the following text in the event enter might work:

    VNAME var = this.somExpression; Gets the whole expression of SOM of the object...
    var fieldObj = xfa.resolveNode (vName);

    fld var = fieldObj.ui.resolveNode ("#textEdit"); See the UI below codes
    FLD. Border.Fill.Color.Value = "255,255,255";

    / * Check the type of object and change the .ui reference:

    Field date = #dateTimeEdit
    DropDown = #choiceList
    CheckBox = #checkButton
    Text field = #textEdit
    Digital field = #numericEdit

    */

    A similar script is located in the output event, with an if statement to check if a value has been entered.

    Hope that helps,

    N.

    PS a word of warning, different fonts can increase the size of the file. Try Myriad Pro, which is more effective...

  • Highlight the required fields

    Hello. I have a form with many elements like select the list, text box, and date picker. These are the required fields of the form with the required model and required value set to Yes also. I want to emphasize these required fields with the pale yellow background when loading the page. Anyone can guide me please?

    For Multi Select Value:

    $('.select2-choices') .css ('background-image', 'none').css('background-color','yellow');

    And then, you add a line like this for each required field:

    $(' #s2id_ITEM_NAME.select2-choice') .css ('background-color', 'red').css('background-image','none');

    Replace nom_element with the name of the element in the page, something like P101_LOGIN, etc.

    Sergio

  • How to remove the option of manufacturer brand label in the owner of the label field in the Specs trade?

    I am trying to remove this label of brand manufacturer of the label options.

    PLM for process 6.1.1.5

    I know it is a default option in the version, but I can add the code for that?

    It is impossible to change the status of the Label Owen in ADMN, but you can run the following against your DB to set the status "Brand manufacturer label" to archive. Then, it will not appear in the options for labels.

    update the status for all language IDS

    Update gsmLabelOwner

    set status = 4

    where pkid = "21590A066F8F-6978-4363-B1AC-58C7F52B597C.

    Important notice: Please backup your DB before that you were trying above solution.

    And there may be some potential risks (I am clearly not currently). So please save this change. In the future, you encounter some problems on Label owner maybe we could talk.

  • Pop-up menu is coming to press the long of the label field

    I have a screen where I have a clickable labelfield. For this I am the touchEvent() substitution. Now on the screen, I add two menus. So when I touch the labelfield for a long time, it shows the pop-up menu with these two menu that I don't want. How to hide this pop-up menu?

    This happens as I'm back super.touchEvent () for (overridden) method of key event.

    Help, please.

    I changed the code from menu addition like that and it works:

    public void makeMenu( Menu menu, int instance )
        {
            super.makeMenu( menu, instance);
    
            if(instance == Menu.INSTANCE_DEFAULT)
            {
                 menu.add(new MenuItem("xxx", 1, 1) {
                    public void run() {
    
                    }
                }); 
    
                 menu.add(new MenuItem("yyy", 2, 2) {
                    public void run() {
    
                    }
                });
            }
    
        }
    

    This line makes the difference here:

    if(instance == Menu.INSTANCE_DEFAULT)
    
  • Dial a number in a label field

    Hello

    I am currently developing an app for my blackberry. I have a labelfield:

    myLabelField6 = new LabelField("01226 211 211", LabelField.FOCUSABLE);
    

    which displays a phone number. Could you help me please by allowing this phone number be clicked on and then call the number?

    Any help on that would be great

    Thank you

    Ash

    as the method is part of the labelfield class, you can use its methods, simply call getText to retrieve the text.

Maybe you are looking for

  • Equium L350 beep at startup

    HelloI have a laptop Equium L350 and for a few months, whenever I restart the laptop or start the computer bleeps it about 15 times before you start windows vista. I don't know what this means, but when she starts the function click on the touch pad

  • Satellite P100-276 - 1 pixel vertical line

    Help, please. My Satellite P100-276 always shows a white * vertical *, screen of approximately 1/3 from the right side.Changing the resolution of the screen does not change the width of the line.Even at startup before Windows is active.A screenshot d

  • / Navigation software crashes

    I have a Moto Neuve X pure and I tried all browsers (Chrome, Opera, Opera mini, Dolphin) it crashes. I send the report and it continues to crash until I close the application. I find another blocking apps also (Scanner Radio Pro...). What is a phone

  • charge port wont fully insert

    I've had my iPod classic for about 4 years now. I tried to insert the cable into the port today and it won't lock. It is the first time that this has happened. I checked to see if something is blocking, but it seems well. Any suggestions Thank you

  • HomeServer2011 media library update

    I have about 1 TB *- and * .mpg .mp4-files in the "videos"-my homeserver Serverfolder. "." How can I tell Windows Media Player to update its media library, when files are added to the Serverfolder?