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

Tags: BlackBerry Developers

Similar Questions

  • 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.

  • 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.

  • 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
        }
    }
    
  • Representative of the long text on label with 3 points

    Hello

    I have a label field that has a fixed layoutchild, which is relatively low for the content of the very long label...

    That part of the text that the label can contain is displayed alone... But I would like to add three points after the text to display for the user that there is always a part of the text that is not displayed...

    How can I achieve this?

    Hi sheeluwiki
    no need to add points because you're labelfield it automatically will come if you go the LabelField one = new LabelField ("some text", DrawStyle.ELLIPSIS).

    Use DrawStyle.ELLIPSIS style for your labelfield and check...

    Thank you

  • Why the highlighting of text in a PDF document does not work after you save the file

    Why the highlighting of text in a PDF document does not work after you save the file

    What application you use to highlight?

  • In Windows Vista, when I type text in an e-mail message and then try to highlight, the text disappears.

    I HAVE WINDOWS VISTA. WHEN I TYPE THE TEXT ON THE E-MAILS AND TRY AGAIN AND HIGHLIGHT THE TEXT DISAPPEARS FROM IT. I'VE BEEN ADVISED THAT PERHAPS THE COLOR IS WHITE (I THINK THAT OUR GIRL CAN ACCIDENTALLY CHANGED SOMETHING SINCE IT IS A NEW PROBLEM)
    I DON'T KNOW HOW TO CHANGE THE COLOR. PLEASE CAN YOU HELP. Thank you.

    original title: TEXT DISAPPEARS WHEN I TRY TO highlight THE TEXT

    You can open Notepad and type something.  Press the Insert key, and then try to go back and change what you type and you will see the difference between insert and Overtype.

    I can't help with Firefox, but in IE, you can change the colours via Tools | Internet Options | The colors.  I think Firefox has a similar option, but you need to ask in a forum of Firefox to see the option.  As it happens in the browser, then it is clearly a browser problem and not a problem in Windows mail.

    Steve

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

  • How do I create a Wizard of action as both copies and highlights the text?

    Hello

    This may show that I am not a very experienced user, but that's it. How do I create a Wizard of action as both copies and highlights the text? I want to make a tool that does both, but when I try in Action Wizard I don't see these editing options.

    Help appreciated.

    See you soon,.

    Michael

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Prof. Michael A. Gilbert

    Coordinator computer SCIENCE

    Department of philosophy

    424 Ross S

    [email protected]

    f; Coco

    Is not possible.

  • When a box is checked, insert text in another field

    Hello

    I know there has been a lot of another thread like this one, but for some reason that my code does not work.  I try to have text in a field when a check box is selected.  Can you please please help.

    For a mouse an event:

    var dateCheckbox = this.getField ("Date or");  checkbox

    var detailField = this.getField ("expiry details");  field

    If the "date or" is checked that change details of Expiration 'Hello '.

    If (dateCheckbox.value == 'Yes') {}

    detailField.value = "Hello";

    }

    Which mouse-up event do you use? In general, when you try to trigger something based on a selection of the checkbox, you should also take care of the disabled value. In addition, the value of exports of a checkbox control can be changed, is usually a better approach to check the value! = 'Off', because 'Off' will always be used if not controlled.

    Try the following as the event of mouse-to the top of the "Date or" check box:

    var detailField = this.getField("Expiration Detail");  //field
    if (event.target.value != "Off") {
        detailField.value = "Hello";
    }
    else {
        detailField.value = "";
    }
    
  • Highlight some text in a paragraph

    Hi all

    I use FrameMaker structured 10 and I try to point out some of the text.

    I tried a number of ways, and it shows but does not record.

    With the help of Character Designer has failed.

    Thanks for any help,

    Myko

    I found that the response has been to highlight the text in the window document, and then in the window elements click on '(underlined) u' which should have an entry box then click on the "WRAP" button at the bottom of the window. I also found that if I wanted to "BOLD" text also although I had to click "BOLD" then the button of change before pointing out.

  • Highlight the text [iOS]

    I've updated yesterday my adobe reader software on my iPad Air yesterday. When I try to highlight the text he become total darkness of the highlighted text.

    I hope that you can help me

    Hello

    We have received your PDF document by e-mail.  Thank you!

    I opened the PDF in Acrobat Reader, the desktop version and confirmed that your highlight color is set to black and opacity is set to 100%.

    I suspect that accidentally set you the highlight color in black by Acrobat Reader for iOS on your iPad Air.  (The default color is yellow).

    To change the highlight color

    1. Open your PDF document in Acrobat Reader for iOS.
    2. Type on the black nail in the document.
    3. Select 'Color'... "in the context menu that appears.
    4. Click the color you want in the color scheme.

    It can be difficult to see due to the background color of your PDF document.  But you can see that the highlight color has changed and the highlighted text is readable now.

    Optionally, you can change its opacity by selecting 'opacity '.... "in step 3 above.

    Acrobat Reader will remember your highlight color choice next time.

    I hope this helps.

  • I'd like to edit a PDF secure document did not change the text, or the layout at all I would do is highlight the text.  How can I do this?  With the help of Adobe Acrobat DC 15.9.20077.160923

    I'd like to edit a PDF secure document did not change the text, or the layout at all I would do is highlight the text.  How can I do this?  With the help of Adobe Acrobat DC 15.9.20077.160923

    You know the password? Otherwise, the security policy does not allow adding comments in the file, then there is nothing you can do about it.

  • How to change the size of text in the fields to fill?

    Please let me know how change the size of text in the fields to fill?

    Hey Swan, laken59599864

    It is not possible to change anything in the PDF with Adobe Reader.

    You may need to open the PDF with Adobe Acrobat and choose "tools > forms > edit ' and double-click on a text field to view its properties. Click on the appearance tab, and then change the font size as you wish.

    Hope this is useful.

    Kind regards

    Ana Maria

  • I've created a form that uses the value field text to fill the text of another field.  Does not take into account changes

    I've created a form that uses the value field text to fill the text of another field.  However, if I need to change the text, the second field does not update this change.  Instead of reset the form each time, is the Javascript code to update the fields if they have been modified?

    For example I Text1 and Text2.

    When I type in Hello in Text1 I see Hello in Text2.

    Later, if I decide to change to Goodbye Text1, Text2 remains Hello.

    The shape of the hoe can recognize this change?

    Thank you

    Edit: I think I have misunderstood the situation.

    If you want to both fields have the same value, just to give them the same name.

Maybe you are looking for

  • IQ500: Iq500uk recovery disks?

    Hi all You are looking for assistance.  I have an Iq500.uk and you want to return to the factory settings.  I have tried factory reset via windows (all programs - PC help & tools - Recovery Manager).  I can run through a few screens of recovery and w

  • Windows administrator password

    My son has an admin password on her computer.  He has recently changed his password and now it can connect at the start when he turns on his computer.  If the computer goes into lock mode, it can not reconnect unless it restarts the computer.  He tri

  • App does not properly

    Who can I talk to or email regarding my application doesn't does not correctly load app World. I have a created a cascades for the alpha device app, but some parts of the XML and imageView not load. On the Simulator, it runs and loads correctly but. 

  • BlackBerry bold 9000 BlackBerry Smartphones

    Hi... my name is Marie and I'm a new user of blackberry "BOLD" 9000.plz tell me or give me the url of pc suite of this bb.and also tell me about the bbm pin,...? Please

  • Browser on "BOLD" blackBerry Smartphones

    Just got my blackberry "BOLD" a few days ago and had a curve for more than a year, and before that a Pearl. I can't the browser to go to Ebay.com... the engine of research put me on Ebay mobile.com I don't want that ebay mobile will not completed as