ObjectListField separators

I have an ObjectListField with a few dozen items in the list. I want to have a thin line that separates each item, similar to display it contacts and messages. What is the right way to do this?

To come back to this a few weeks late.  I had to replace graphics and add the following line of code:

graphics.drawLine(0, y, Display.getWidth(), y);

Tags: BlackBerry Developers

Similar Questions

  • How can I remove separators in the bookmarks bar?

    I inadvertently inserted separators in the bookmarks bar and now I can't get rid of them.

    It requires a precise positioning of the mouse pointer to delete directly from the bookmarks toolbar.
    It is easier to do in bookmarks (library) Manager and open the bookmarks toolbar folder.

  • Add separators to location bar entries?

    I've recently updated to the latest version of Firefox and have spent the last days to make him look and work as I want (or at least close to it), but there is something in particular that is bugging me. Return on FF24 and earlier versions, sites inscribed in the history of the location bar are separated by pale gray lines. At FF38, there is no such separators. Should not be a big deal, but it is difficult for me to differentiate between different sites on the list quickly. I tried searching through various options and I checked some add-ons as Restorer of classic theme, but I did find something that will do what I want. Is it possible to recover these separators?

    I also wonder if it is possible to switch to this button inside the address bar and not to the right of it. I'm used to so it is to the left of the arrow of the menu drop down and I keep bad clicking now that it has been moved.

    Thanks in advance for any help!

    There is a combined Stop/Reload/Go button that is placed at the right end of the address bar.

    • STOP button: during the loading of the page
    • Reload button: when the page load is complete
    • Print button: when you change the contents of address bar

    Note that you can middle - click on the Reload button to duplicate the current tab in a new tab.

    Another possibility is this code:

    .autocomplete-richlistitem {padding-top:2px!important; padding-bottom:2px!important}
    .autocomplete-richlistitem:not(:first-child) {border-top: 1px solid #ddd !important}
    .autocomplete-richlistitem[selected="true"] {border-top-color:transparent!important}
    

    To highlight it, you can use code like this if you wish;

    *|span.ac-emphasize-text {box-shadow: inset 0 0 1px 1px rgba(0,255,255,1)!important; background-color: rgba(0,255,255,0.2)!important;}
    
  • I removed everything between two separators of Firefox and now cannot place anything between them; How can I bookmark it?

    After a hard disk crash I reinstall Firefox (without saving). I moved "Recent Tags" between the default separators above the bookmarks Menu box and find, I now can't put anything in the space when the "Show all bookmarks" box is open. Given that space exists, how can I make this functional space by putting something here?

    "Show your bookmarks" drop gift list shows some default you can't delete entries (menus) and other elements that are located in the Menu folder bookmarks.
    You can check if you have a splitter directly in the upper part of the Menu folder bookmarks by selecting this folder in the left pane of the Manager of bookmarks (library).

  • Where can I find toolbar separators and spaces containing the separated my icons?

    I've updated to Firefox 36.0 and I refreshed it was slow in its operation. My toolbars customization, I noticed that the separators and adjustable spaces previously, I had to keep my separated toolbar icons were is no longer included in the charge.
    My question is where can I find them?

    Currently, only available for bookmarks toolbar folder. The separators have been removed in the new user interface that came with Firefox 29, back in April 2014.

    It - https://addons.mozilla.org/en-US/firefox/addon/classicthemerestorer/ - is the only extension I know which supplies separators to other toolbars.

  • When you customize the bar of the add-on, separators ("" | "") are not visible. How can I remove them?

    Not only are they not visible, they are no longer selectable. They /do/ normally appear (that is, when not customize toolbars). Under Firefox Linux Mint 15 22.0 (Olivia: x 86-64).

    Your toolbar customizations are stored in the localstore.rdf file in your Firefox profile folder currently active. This XML file is difficult reading and I don't remember seeing a good documentation on how to modify. If you want to give it a try, please make a backup first.

    If the file is corrupted (or most corrupt, according to the case), you can rename or move it Firefox will generate a new one with default settings and you can start customizing from scratch.

    With the road, it actually seems that you should be able to find and remove the separators.

      <RDF:Description RDF:about="chrome://browser/content/browser.xul#addon-bar"
        mode="icons"
        collapsed="false"
        currentset="addonbar-closebutton,stylish-toolbar-button,spring,downloads-button,separator,fireshot-Capture-Button,greasemonkey-tbb,noscript-tbb,fiddlerhook-toolbar-button,status-bar" />
    

    Why give a try:

    Open your current Firefox settings (AKA Firefox profile) folder using

    Help > troubleshooting information > button "Open Directory".

    Switch back to Firefox and output

    Break, while Firefox ends his cleaning, so make a backup copy of localstore.rdf (e.g., localstore.0808) and open the rdf file in a text editor to find and change the separators of the addon ramp.

    When you restart Firefox, your changes should be obvious.

    A little luck?

  • How to remove bookmarks in the toolbar separators?

    I put separators between my favorites that are on the bookmarks bar. I want to delete them. How?

    Yes, I forgot the number of items marked as a single element, you should do so from the bookmarks library or whatever.

    I'm glad that you have solved the problem.

  • I m using firefox on mac. I used it for the first time on mac while I had put a lot of "separators" on the bookmarks toolbar... How to remove the xtra those? Small request that it creates big problems...

    Well not much description required in this case. I was using firefox for the first time on a mac and so was trying new things with this version of firefox. Just got stuck with these separators xtra... Can't find a way to get them off of my bookmarks toolbar...

    You can open the Bookmark Manager (Bookmarks > show all bookmarks) and go to the Favorites bar folder in the left pane.
    You can then remove the separators in the right pane.

  • Border ObjectListField

    Hello

    I can't draw a border around an ObjectListField. The border runs on the right side of the screen, with no visible straight edge. Any ideas on how to solve this problem? I tried a number of things and that you have not had success yet.

    This is the code for the for the ObjectListField layout() method:

    protected void layout(int width, int height)
    {
        super.layout(width, height);
        this.setMargin(5, 5, 5, 5);
        this.setPadding(5, 5, 5, 5);
        this.setExtent(Display.getWidth(), this.getContentHeight());
    }
    

    And the display will show as follows:

    Thank you

    Never mind. A stupid bug. Just changed the call setExtent to:

    this.setExtent (Display.getWidth () - 25, this.getContentHeight ());

    I was sure that I already tried, but anyway it works now...

    See you soon,.

  • Problem with the ObjectListField

    Hello

    I have problems with the method getSelectedIndex() ObjectListField.
    Supposedly, when there is no index selected, it returns-1. But how come it always returns the index of the last element?

    To illustrate, I created my own dialog that has similar functionality to the "device window select" Bluetooth BB application. I have an ObjectListField and a Cancel button. What I did simply, is to change the label of the button to show the selected index. I have attached my sample code below.

    public class MyDialog extends dialog
    {
    private ObjectListField m_list;
    private ButtonField m_btn;

    public MyDialog)
    {
    Super ("Select Device:", null, null, 0, Bitmap.getBitmapResource ("bluetoothIcon.PNG"), Manager.FOCUSABLE);

    m_List = new ObjectListField();
    m_btn = new ButtonField ("Cancel", Field.FIELD_HCENTER);
    m_List.set (new String [] {"first", "second"});

    Add (m_List);
    Add (m_btn);
    }

    protected boolean navigationClick (int status, int time)
    {
    m_btn.setLabel (Integer.ToString (m_List.getSelectedIndex ()));

    Returns true;
    }
    }

    Can someone help me on this problem? Is there something wrong with my code, or is the buggy API? All I want to do is to return an index of-1 if there is no selected item in the list.

    Also, I tried the isFocus() method to check if the list is being concentrated, it always returns false even if the list is OBVIOUSLY being focused. I'm running out of options on how to determine the solution to this problem. Help, please!

    Thank you very much.

    @jacylan - I do not use isFocus() to determine if the ListField is net.  Take a look at the following code, I think that with this, you can force-1 when the ListField is not the point.

        protected boolean navigationClick(int status, int time)
        {
            int selectedIndex = m_list.getSelectedIndex();
            boolean listInFocusOption1 = false;
            if ( this.getLeafFieldWithFocus() == m_list ) {
                listInFocusOption1 = true;
            }
            boolean listInFocusOption2 = false;
            if ( m_list.isFocus() ) {
                listInFocusOption2 = true;
            }
            m_btn.setLabel(Integer.toString(selectedIndex) + ":" + listInFocusOption1 + ":" +listInFocusOption2);
    
            return true;
        }
    
  • Customization of the user interface on Blackberry - ObjectListField

    Hello

    Someone has an idea how to deal with the following scenario with the ObjectListField on 4.5 OS worm. A simplest thing was to add the string with '\n', but it does not work with BB. Y at - there any option other to achieve this other than too much riding paint method?

    Scenario:

    Point 0: Label-10/12/2010

    String: This is the first element of the listfield.

    Point 1: Label-10 92 2010

    String: This is the second element of the listfield.

    .

    .

    .

    .

    .

    .

    .

    .

    the field seems to serve three times the rowheight fontsize.

    Use setRowHeight (getFont () .getSize () * 3) to achieve this goal.

    Now you can draw the lines using the y and adding the fontHeight to row2, row3 RESP.

    to get the update behavior, you must change the drawFocus method (it is a bit Advanced, it would be easier to let the entire marked input)

  • Display in the ObjectListField imageField

    I use JDE 5.0 which does not support the RichList so using the ObjectListField to display items title... as well as titles of the order of the day, I want to display their image... Is Howz possible... Help, please

    Welcome on the support forums.

    you do not include the field of the image, instead, you draw the image directly using graphics.drawBitmap in your drawListRow method.

  • How to position ListField or ObjectListField

    Nobody knows how to set the x, position y ListField or ObjectListField?

    I test on the Simulator Blackberry 9700 ATT, running OS 5.0.

    I am using an ObjectListField to create submenu in OS 5.0 and I put the width using getPreferredWidth(), so that it does not occupy the entire screen. So it's starting to look like a menu system, but it is default x, position is 0.0 and I need to change that.

    Thank you

    Steve

    setMargin works very well for this.

    You can use it like this

    myfield.setMargin (y, 0, 0, x); up, right, down, left

  • Label of the choice of the user of an objectlistfield element control knob

    Hello

    I'm a beginner and this is my first BB app. I have a problem and I tried to do on my own, done quite a bit of research, but could not find any solution.

    The thing is, I have a button on the main screen, was added by clicking this button, I push a popupscreen at the top of the stack that contains an ObjectListField. Now, I want to put the label of the button on the screen as the name of the selected field in the ObjectListField. I have attached my code on which I am experimenting and trying to learn (really enthusiastic about it ), so would appreciate any help in this regard. Thanks a ton

    package mypackage;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.ui.component.*;
    
    public final class MyScreen extends MainScreen
    {
    
        ButtonField btn;
        public MyScreen()
        {
            // Set the displayed title of the screen
            super();
            setTitle("MyTitle");
    
            btn=new ButtonField("Label",ButtonField.CONSUME_CLICK);
            btn.setChangeListener(new FieldChangeListener()
            {
                public void fieldChanged(Field field,int context){
    
                    UiApplication.getUiApplication().pushScreen(new mypopup());
    
                }
            });
    
                    add(btn);
    
        }
    
                /*public void inval(String lbl){
    
                    this.btn.setLabel(lbl);
                    this.invalidate();
                } */
    
    }
    
    class mypopup extends PopupScreen implements FieldChangeListener{
    
        String it;
    
    ObjectListField obj=new ObjectListField(){
    
            public boolean navigationClick(int status,int time){
    
                int selectedindex=obj.getSelectedIndex();
                 it=(String)obj.get(obj, selectedindex);
    
                UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
    
            MyScreen my=new MyScreen();
                 my.btn.setLabel(it);
                my.invalidate();
    
        UiApplication.getUiApplication().invokeLater(new Runnable()
                {
                    public void run(){
    
                        Dialog.alert(it);
    
                    }
                });
    
                return true;        
    
            }
        };
    
         public mypopup() {
    
             super(new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL|VerticalFieldManager.VERTICAL_SCROLLBAR), Field.FOCUSABLE);
    
             String[] type=new String[] {"a","b","c","d"};
                obj.set(type);
                add(obj);
    
         }
    
        public void fieldChanged(Field field, int context) {
            // TODO Auto-generated method stub
    
        }
    
    }
    

    Hi Simon, first of all thanks a ton for the answer.

    I learned a lot by reading the documentation and links that you gave me.

    But the thing is, I really want to use the class popupscreen instead of the dialog box. So (with assistance), I made small changes in my code, and it seems to work now.

    I write changes in my code for other users who might have the same problem...

    I created a setlabel method (* not to be confused with setLabel), in the class MyScreen and right where I implement anti-pop mypopup class, I did...

    Scr Screen = UiApplication.getUiApplication () .getActiveScreen ();
    If (instanceof MyScreen scr) {}
    MyScreen my scr = (MyScreen);
    My.setLabel (IT);
    My.Invalidate ();

    Finally, it seems to work now.

    See you soon

  • Double line objectlistfield

    I have an objectlistfield which shows a bunch of selectable items that can be selected. The problem with this is that each text is very long and needs at least two lines and the objectlistfield seems not to support this feature. It cuts just text.

    I tried increasing the height of each line, but the text does not change its format. I read that possible solutions would be to replace the "drawListRow" of the objectlistfield but I can't figure out how to do it properly.

    I'll appreciate any type of help.

    First, you must set the line height. Usually, I take double the font size and add 2 for good measure.

    Now you can adjust the drawListRow. You get a parameter which determines where you are in your current line. drawText takes x and y as input. You can draw the first line by using drawText(5,y,text) and the second using drawText (5, y + listField.getRowHeight / 2, Text2). You must take care of a linebreak correct etc, I usually do with a StringTokenizer.

Maybe you are looking for

  • HP envy 17 J160NR: mute button does not turn on after update

    I just downloaded and installed the new update of windows 10 anniversery but now my button mute not turn on. It still works it just won't turn on I really need to light.

  • Is the monitor of imagery needed on the taskbar if you do not print? How many...

    I have checked old solutions here and do not have quite the same issue, I would like to ask. I have the Solution Center on the old pc with XP. Works well, thank you, and several resources always help the XP'. I also have a HP with 8. How many resourc

  • Java has more than 24 hours to install and always current

    I have a new HP Pavilion dv6-7028TX laptop. There is no java at all on this subject. So so I'm trying to download and install without success. If anyone has had this problem and what can I do to fix this?  It took more than 24 hours to install and th

  • Suite McAfee Security

    I felt it necessary to perform a complete system recovery. In doing so, I lost my Iolo System Shield 3. The McAfee trial version will not uninstall and won't let me reinstall the Suite Iolo.

  • says im not the adminastrator

    try to download the update of game and pc says im not the adminastrator but I'm the only one using the pc, and I'm the adminastrator