Deleting line field in the list

Hi all

I use ListField and a menu item to remove the line of list field. Line painting is made by ListFieldCallback drawListRow. The list is created by reading a persistent storage and insertion of data in the list below.

for (vecCounter = 0; vecCounter)<=vectorSize-1;>

data [vecCounter] = tmpsuccessStatus;
myList.insert (vecCounter);
myCallback.insert(dataElement[vecCounter],vecCounter);

}

. When I try to delete the row in the list, is not remove the line that has been a focus, instead of this removes the following line. Is there something missing in this implementation?

selectedIndex int = myList.getSelectedIndex ();

myList.delete (selectedIndex);

tempRetriveVec.removeElementAt (selectedIndex);

myList.invalidate ();

the work of does ' t code above for me... could someone please help me?

Thank you and best regards,

Raghav.

Remove the element of the vector which is present in the ListFieldCallback, I tried it, it works.

Tags: BlackBerry Developers

Similar Questions

  • If I delete a song in the list of duplicates itunes, it has an effect on the existing playlist?

    If I delete a song in the list of duplicates itunes, it has an effect on the existing playlist?

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > view > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning toback up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    With this many files, it might pay to break down the problem into smaller pieces.

    TT2

  • Images in the field of the list does not

    Hello

    I create a list field that contains 10 lines and four fields in each line. The first field is the field of the image. But the image does not come. Other three fields (label field) do very well. I use the simulator of 4.7 and 9530.

    I give my code here also. Please help me.

    class TaskListField extends ListField implements ListFieldCallback {
         private Vector rows;
         private Bitmap _mReceiveAmount;
         private Bitmap _mSentAmount;
        private boolean hasfocus=false;
    
         public TaskListField() {
          super(0, ListField.MULTI_SELECT);
          setRowHeight(60);
          setEmptyString("It is Empty!", DrawStyle.HCENTER);
          setCallback(this);
    
          String images[]={"amount_received.png","amount_sent.png"};
    
          _mReceiveAmount = Bitmap.getBitmapResource("amount_received.png");
          _mSentAmount = Bitmap.getBitmapResource("amount_sent.png");
          BitmapField bitmap;
    
          rows = new Vector();
    
          for (int x = 0; x < 10; x++) {
           TableRowManager row = new TableRowManager();
    
           // SET THE  BITMAP FIELD
           // if amount received, display bitmap
         //  if (x % 2 == 0) {
            //bitmap=new BitmapField(_mReceiveAmount);
            row.add(new BitmapField(Bitmap.getBitmapResource(images[0])));
          //}
           // if amount is sent, set bitmap
           //else {
           // bitmap=new BitmapField(_mSentAmount);
              // row.add(new BitmapField(Bitmap.getBitmapResource(images[1])));
          // }
    
           // SET THE DATE LABELFIELD
    //
           LabelField _mDateField = new LabelField("OCT 10,2010", DrawStyle.ELLIPSIS);
           row.add(_mDateField);
    
           // SET THE LIST NAME
           row.add(new LabelField("Details" ,DrawStyle.ELLIPSIS) {
            protected void paint(Graphics graphics) {
             graphics.setColor(0x00878787);
             super.paint(graphics);
            }
           });
    
           // SET THE DUE DATE/TIME
           row.add(new LabelField("$220",DrawStyle.ELLIPSIS | LabelField.USE_ALL_WIDTH | DrawStyle.RIGHT) {
            protected void paint(Graphics graphics) {
             graphics.setColor(0x00878787);
             super.paint(graphics);
            }
           });
           rows.addElement(row);
          }
          setSize(rows.size());
    
         }
    
         // ListFieldCallback Implementation
         public void drawListRow(ListField listField, Graphics g, int index, int y,int width) {
    
            // g.drawBitmap(0, 0, _mReceiveAmount.getWidth(), _mReceiveAmount.getHeight(), _mReceiveAmount, 0, 0);
             TaskListField list = (TaskListField) listField;
    
             TableRowManager rowManager = (TableRowManager) list.rows.elementAt(index);
             rowManager.drawRow(g, 0, y, width, list.getRowHeight());
         // g.drawBitmap(0, 0, _mReceiveAmount.getWidth(), _mReceiveAmount.getHeight(), _mReceiveAmount, 0, 0);
         }
    
         public class TableRowManager extends Manager {
          public TableRowManager() {
           super(0);
          }
    
          // Causes the fields within this row manager to be layed out then
          // painted.
          public void drawRow(Graphics g, int x, int y, int width, int height) {
           // Arrange the cell fields within this row manager.
           layout(width, height);
    
           // Place this row manager within its enclosing list.
           setPosition(x, y);
    
           // Apply a translating/clipping transformation to the graphics
           // context so that this row paints in the right area.
           g.pushRegion(getExtent());
    
           // Paint this manager's controlled fields.
           subpaint(g);
    
           g.setColor(0x00CACACA);
           g.drawLine(10, 0, getPreferredWidth()-10, 0);
    
           // Restore the graphics context.
           g.popContext();
          }
    
          // Arranges this manager's controlled fields from left to right within
          // the enclosing table's columns.
          protected void sublayout(int width, int height) {
           // set the size and position of each field.
           int fontHeight = Font.getDefault().getHeight();
           int preferredWidth = getPreferredWidth();
    
           // start with the Bitmap Field of the priority icon
           Field field = getField(0);
           layoutChild(field, 32, 32);
           setPositionChild(field, 10, 20);
    
           // set the task name label field
           field = getField(1);
           layoutChild(field, 120, fontHeight + 1);
           setPositionChild(field, 70, 3);
    
           // set the list name label field
           field = getField(2);
           layoutChild(field, 150, fontHeight + 1);
           setPositionChild(field, 190, 3);
    
           // set the due time name label field
           field = getField(3);
           layoutChild(field, 150, fontHeight + 1);
           setPositionChild(field, preferredWidth - 172, 3);
    
           setExtent(preferredWidth, getPreferredHeight());
          }
    
          // The preferred width of a row is defined by the list renderer.
          public int getPreferredWidth() {
           return Graphics.getScreenWidth();
          }
    
          // The preferred height of a row is the "row height" as defined in the
          // enclosing list.
          public int getPreferredHeight() {
           return getRowHeight();
          }
         }
    
         public Object get(ListField listField, int index) {
          // TODO Auto-generated method stub
          return null;
         }
    
         public int getPreferredWidth(ListField listField) {
          // TODO Auto-generated method stub
          return 0;
         }
    
         public int indexOfList(ListField listField, String prefix, int start) {
          // TODO Auto-generated method stub
          return 0;
         }
    
         public void onUnFocus(){
             hasfocus=false;
             invalidate();
    
         }
    
    }
    

    your code is quite a mess, and you probably have a misconception on the listfield.

    in drawListRow you paint directly the object to the line. no need to use fields or similar, graphics methods.

    If you have different objects in your listfield you need to branch in your drawListRow method (if bitmap instanceof object etc.).

    your brief description, it appears you want to have the bitmap in the same line as your other information.

    create a bean with the attributes class, that you need, including the bitmap.

    put objects of beans in your listfield and the data structure (vector).

    drawListRow check that it is a bean and draw it.

    for example (rough code, no control null etc.):

    drawBitmap (0, bean.getBitmap ());

    drawText (bean.getBitmap (.getWidth () + 5,) bean.getText ());

  • Field in the list with 2 columns

    I am creating listfield with two columns as follows [2 |]  Cokes].

    There is an example on how to do this?

    There is an article on the basis of knowledge to developers to add checkbox to a field, but I don't see anything on the creation of several columns.

    Maybe I can get away with adding a field of text instead of a checkbox or have two fields next to the list and sync.

    any suggestions?

    ListField on nature has a great column.

    You can override drawListRow() to ListFieldCallback to divide each row number of columns.

    In this case, you will need to control the width of each column using the class font getAdvance() method that returns the width of the displayed string. And if you combine graphics and text in columns, you will need to also use getWidth() instance method of the Bitmap class to calculate the width of each column.

  • Web Forms: Deleting line based on the value of a specific column

    Hello

    I have an online form in which I want to apply delete missing on the ranks, but only on the value of the first column. So, if the first column is #missing I want the deleted row, even if the columns are given in it.

    Is it possible to do this?

    I'm on ver 11.1.2.2 Hyperion Planning

    Shehzad

    Published by: shehzad k on January 24, 2013 11:51

    Unfortunately, no. There is no way to add the delete line based SOLELY on the existence of a value in the first column. It would be nice to see some of the more advanced features "conditional delete", we en flies over to the planning of the entry forms.

    You can do the "clumsy" things with data validations where you gray - out ranks in view of the existence of a value in a particular cell, however while this might SUGGEST that the user should not enter data in a particular line, it would not PREVENT to do so.

    We have seen many improvements in form lately with the introduction of data validations. I hope the momentum continues.

    -Jake

  • How can I delete unwanted updates from the list?

    Windows 7 update list more than 35 languages to be updated.  How I removed these updates from my list of updates not installed so that I see only the coming updates to install in the future?  Whenever I open the list of updates, these 35 languages continue to flow upward.

    HOW to hide an update (or restore a hidden update)
    http://www.SevenForums.com/tutorials/24376-Windows-Update-hide-restore-hidden-updates.html ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • How to delete a field in the essbase rules file?

    It is a fundamental issue, I create a rule to load the metadata for essbase, when I create the rules file, it displays 20 default fields and I just need to 14 fields, so I want to 'remove' some fields, but I don't know how to do, should I use 'combine' or 'reject records "?

    Nightstands, if I want to add a field in the rules file, should I use 'split' field? or "create filed with the help of text"?

    Edited by: user2571802 may 6, 2010 11:40

    Just to add I know you use ODI and you can be implemented a rule of charging for it, if you manually enter the details of the column without loading a file or using SQL when you design it, it does not matter on the extra at the end of the column names columns as they will be ignored.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to delete sites duplicated in the list of Favorites

    I accidentally moved a folder containing multiple copies of favorite websites in my list of favorites on my home page. . is there a way to delete these entries in a group without deleting favorites that I already had.

    Thank you

    You don't have to delete them manually without a third-party application, but this will make it easier. Go to C | Documents and Settings. Your user name. Favorites. Hold down the Ctrl key while you click the dupes to highlight and then delete. Make about 20 at a time because a little hiccup and highlighting will disappear and you will have to start.

  • The maximum size of the text entered in the field "Search" the list view

    I created an APEX 5.0 application using theme 51. I have a simple list view for which the function 'Enable search' is checked.

    I want to limit the length of the "search string" in the field "search". How can I do this?

    There seems to be no limit on the size of the string in the search field. Enter a very large string in this field and submitting research causes APEX return an "Internal Server" error

    CITY

    Hi Michael,

    the amount of data entering your users? Because the limit should be 32 KB.

    Unfortunately, the search field is generated by the jQuery Mobile framework so we do not really have control of a limit, but you can specify the static 'ID' attribute in your area in order to "myListView" and then add the following code to your page "Run when the page loads" level attribute

    $( "#myListView input[data-type=search]" ).attr( "maxlength", 255 );
    

    But I doubt that this is necessary. Can you please post a screenshot of your error message "internal server".

    Concerning

    Patrick

  • delete a field in the node Manager

    Hi all
    a really stupid question, but I can't find the answer. I created a few areas here and there, with my colleagues and I have registered my node with nmEnroll Manager.
    Now that I've finished testing, how do I UN-register of these areas? Is it safe to just delete the directory?

    Thank you

    PS: Weblogic 10.3

    Published by: dvm on November 25, 2008 06:25

    I don't know if there is a way based on tools to do this, but you can remove the "$WL_HOME/common/nodemanager/nodemanager.domains" domain, and then restart the nodemanager.

    Published by: david.karr on November 25, 2008 06:33

  • [JS] [CS4] - populating a drop down with the list of printers?

    Hello

    I am filling a drop down field with the list of available printers. Here's what I have:

    var app.printerList = printerList;

    var w = new Window ("dialog");
    w.orientation = 'row';
    var dropDown = w.add("statictext", undefined, "Please select the printer");
    var dropDown = w.add ("dropdownlist", undefined, printerList);
    dropDown.selection = 0;
    var buttonGroup = w.add ("group");
    buttonGroup.add ("button", undefined, "OK");
    w.center();
    w.show();
    

    This will fill a drop down with "Printer, printer, printer, printer" for each printer instead of the printer name (which is what I want).

    When I try:

    var printerList = app.printerList.name;
    

    I get a drop of water to the bottom of the empty entries.

    Any ideas on what I am doing wrong?  Exactly how does the printerList?

    Thank you

    Lindsay

    It also takes to still in my system, so I would add the following line

    var pL = app.printerList;
    

    and pL to avoid multiple calls to the system. for example

    var arrayPrinterNames = [];
    for (var i = 0; i < iCount; ++i) {
              arrayPrinterNames.push(pL[i].name);
    
  • Hello. Is it possible to remove a web site from the list "most visited"? If so, how?

    I doubt, there is a way to do it, but I would like to know for sure. I connect to Gmail very often, so of course, it appears in the list of "most visited". Although he is usually a convenience for people to reach a web site visited often faster, I want is not to appear there. It's not favorite, where you must choose to save a site, so I doubt that there is a solution. If I had used "Private browsing" in the first place, this may have prevented my problem, but I didn't know we could go private until today. Thank you.

    If it's a bookmark, then you need to reset the counter for this bookmark.
    You can make the column number of visible in the bookmarks (library) via the menu Manager ' views > columns.

    • "Most Visited" and "Recently set bookmark" and "Recent Tags" are examples of what is called Smart Bookmarks folders and are not the real existing folders.
    • Smart folders show a list created by a query of the places.sqlite database that stores the bookmarks and history in Firefox.
    • Smart folder lists show a maximum of 10 entries by default.
    • Bookmarks and history items that appear in a list of smart folder are also stored in another file, and any changes are applied to the element of bookmark or true story.
    • If you delete an entry then the list is shifted upward and an entry that was not previously identified is added to show the 10 entries.
    • If you add a new bookmark or visit a Web site, then a new element is added at the top and disappears from the entrance at the bottom of this list.
    • Objects but that disappear from the list have not disappeared, just not more appear in this list.
    • Actions such as copy & paste, or delete that you perform on bookmarks in such a list is made on the original bookmark.
  • unknown device "icamera" appears in the list of devices in network in my own home network-URGENT please help me

    under network devices I see "icamera.  I have never connected an icamera to my computer or any computer.  When I right click on it there are only a few details under properties. I look to the top of mac and the unique identification number and its meout freaking cause he says Sercomm Corp. making home surveillance network cameras.  I'm wondeering if a hidden camera could be in my house somewhere.  trying to pair with him ask an ID unique which I did not, but only to play with it, I know it is a 4 digit code.  I can't connect to it and its scaring me...  I can't delete or remove from the list.  Ive had the same provider and specific to the home network for 2 years.  My husband is a genius with computers (for me), it can build computers.  IM thinking there is something hes doing and wont tell me...  HELP PLEASE

    I had the same problem... but what I found is... I have ADT Pulse that came with a camera... and wireless sound while remaining connected to a router that is on my network.  He never use to see one, but all of a sudden, he is now listed in my network neighborhood.  Maybe an update of came thru that now allows it.  But that's what it is... so if you have some sort of security at home with a camera... It's probably that your Detection.

  • How to remove the lines that have the employee name double?

    Hello world

    Greetings

    I'm using oracle 11g.

    Suppose I have a table and I want to delete lines that have the name used twice?

    So given below is my table so I only delete lines that have more than one 'Ram' and 'Dilip' ename.

    How to do this?

    EmpID Ename salary Commission depnto
    101RAM50004531
    102RAM60007652
    103Sisi34568763
    104Dilip76566754
    105Mohan98787675
    106Dilip56469876
    107Ganesh98234557

    You can use a simple code as follows

    Delete From EMP

    Where rowid! = (select min (rowid) of the group by Ename EMP);

    For preserved older values using 'min (rowid)'

    and for the most recent values required use "max (rowid)"

    Thank you.

  • Please help, blonde with fields for the calculation of evil!

    URGENT


    I have a question that needs urgent care


    On Adobe Acrobat 9 Pro that I've created a form through import the excel file in adobe, not the help of live program designer. I'm having the problem that the computation of a field based on another field of calculation, it will not always update regularly or properly. When it doesn't, I have to go back and edit form fields, and redo the calculations. This form is intended for multiple users and I need properties to work properly each time, not been hit and Miss. In this case, the purpose of the document is to take different calculations of each page, add the total find VAT on this amount and it amounted to a total. Those are the numbers that continue to change due to the subtotals not automatically updated when a quantity or price has changed.


    Any advice would be most appreciated.


    Very Happy

    Unlike in Excel, in forms Acrobat the field calculation order is not

    determines automatically. So, if you have a field that is, for example, the

    the sum of the fields B and C, then field D which is has * 0.15, if D is not

    After A calculated, it will result in incorrect values.

    To correct this select the object selection tool and then go to the forms - Edit

    Fields - Set field calculation order... and there, change the order of the

    fields in the list to match the desired calculation order.

Maybe you are looking for

  • Cell data is disconnected - iPhone 6s

    Hello I noticed a few times where my cellular data disconnects or drops completely after it disconnects from the WiFi (but it says on the top left corner that 4G works but nothing works). I can't get the cell data to apply when I restart the phone. D

  • Unable to complete wireless

    can connect to internet wireless PC, but cannot print from it. I am running XP in both computers.

  • Cancel the default program to open a specific file extension

    Trying to open an attachment with the file extention .zmc I accidentally agrees to always open this type of file with adobe reader.  Do work, but I can not cancel the default, only change and I don't know what to take.  Any ideas?

  • holiday

    I'm starting a trip next week.  How can I prevent Microsoft of denying me access to my Email because I'm in a different place?

  • Model classic blackBerry sold on the Blackberry store

    I want to buy the classic of the Canadian store for BlackBerry, but I need to know what model it is. Specifically, I need the SQC100-4. Anyone know what model is sold on the Canadian site store Blackberry?