Draw the line below each item ListField

Hi all

I want to make a ListField similair to the contacts application. Under each ListField article a horizontal line is drawn as a separator. Somehow, I can't draw a line under each article. It works if I put the line above each item, but this means that the last element does not.

That's what I'm doing now:

public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width) { // Draw a line separator above each field except the first one    if (index != 0) {     graphics.setColor(Color.LIGHTGREY);       graphics.drawLine(0, y, width, y);    }}

Thanks in advance

When you draw the line, you need to add the () listField.getRowHeight for the parameter y and subtract 1, IE

graphics.setColor(Color.LIGHTGREY);
int yPos = y + listField.getRowHeight() - 1;
graphics.drawLine(0, yPos, width, yPos);

Tags: BlackBerry Developers

Similar Questions

  • How to draw the lines automatically

    In LabVIEW I must draw a line automatically (both vertically and horizontally) the user will define the vertical and horizontal number lines.

    Is this possible with LabVIEW

    Thanks in advance

    You move to the point of departure of the line using "move the pen", and then draw the line using "draw the line".

    Repeat for each line. (using for example a for loop and autoindexing on positions).

  • Problems with the line below 1 pt thickness

    In Illustrator CS6, when I draw a horizontal line with the pen tool or the line tool, the weight of the line can be set below 1 pt.  If I draw the line at an angle, I set the line thickness to be less than 1 pt.  If I change this line from diagonal to horizontal position, the weight of the line snaps back on 1 pt.  Does anyone have an idea why this is happening or how to fix it? Thank you!

    Look to match the pixel grid
    Illustrator: Problems with snap to grid of pixels

  • I'm not able to decrease the width of the line below 1 Pt, while I have no problem, it increases. What should I do?

    I'm not able to decrease the width of the line below 1 Pt, while I have no problem, it increases. What should I do?

    Turn off snap to the Pixelgrid:

  • How to draw the line under STROKE and fill of an object in illustrator cc? Ideas: D...

    How to draw the line under STROKE and fill of an object in illustrator cc? Any ideas ...

    Aleksandar,

    If I (put) understand it, you will need to divide the object. You can:

    (1) select the object and Ctrl / Cmd + C + F, and then remove the filling of the copy and the blow of the original;

    Draw 2) and drag the new piece down between Division 1 objects) in the layers palette, or select 1 copy) and Ctrl / Cmd + C + F + X + F or similar.

  • draw the line between black pixel: coordinates of the selected pixels?

    Hello

    I want to build a script that can check a Photoshop file and:

    -find the black pixel

    -for each black pixel, looking for an another black pixel at a maximum distance of 5 pixels

    -then draw a line between the two black pixels.

    I wrote this script below (my first script...), but it's VERY slow (and my final image is VERY large), I think because I test the color for each pixel in the image.

    So an alternative would be to select a black pixel with the wand, then the script record all the details of the selected pixels, then my script wil test only the pixels (less than 1% of the pixels are black in my image).

    Is this possible with JavaScript?

    Thank you for your answer!

    Marc

    function main(){
     var startRulerUnits = app.preferences.rulerUnits;
     app.preferences.rulerUnits = Units.PIXELS;
    
    
     var myHeight = app.activeDocument.height;
     var myWidth = app.activeDocument.width;
    
    
    // Find black pixel
     for(var i=5; i<myWidth; i++) {
      for(var j=5; j<myHeight; j++) {
       activeDocument.colorSamplers.removeAll()
       var sampler = activeDocument.colorSamplers.add([new UnitValue (i, 'px'), new UnitValue (j, 'px')]);
       if (sampler.color.rgb.hexValue === "000000") {
    
    
    // For each black pixel, search another black pixel below left up to 5 pixels
        for (var m=i-5; m<i; m++) {
         for (var n=j+1; n<j+5; n++) {
          activeDocument.colorSamplers.removeAll()
          var test = activeDocument.colorSamplers.add([new UnitValue (m, 'px'), new UnitValue (n, 'px')]);
          if (test.color.rgb.hexValue === "000000") {
    
    
    // Then draw a black line between the two black pixels
           var FillColour = new SolidColor;
           FillColour.rgb.hexValue = '000000';
           var ad=activeDocument;
           ad.selection.select([[m,n],[i,j],[m,n+1],[i,j+1]], SelectionType.REPLACE, 0, true);
           ad.selection.fill(FillColour);
           ad.selection.deselect()
          }
         }
    
    
    // For each black pixel, search another black pixel below right up to 5 pixels
         for (var m=i+1; m<i+5; m++) {
          for (var n=j; n<j+5; n++) {
           activeDocument.colorSamplers.removeAll()
           var test = activeDocument.colorSamplers.add([new UnitValue (m, 'px'), new UnitValue (n, 'px')]);
           if (test.color.rgb.hexValue === "000000") {
    
    
    // Then draw a black line between the two black pixels
            var FillColour = new SolidColor;
            FillColour.rgb.hexValue = '000000';
            var ad=activeDocument;
            ad.selection.select([[i,j],[m,n],[m,n+1],[i,j+1]], SelectionType.REPLACE, 0, true);
            ad.selection.fill(FillColour);
            ad.selection.deselect()
           }
          }
         }
        }
       }
      }
     }
    }
    main();
    
    

    If someone wants to do the same thing, the ImageJ software works very well on very large images (1 billion pixels) by the process according to > binary > close

  • SUMIF line is equal to the value of test and the line below is '-'

    Hello

    I have a spreadsheet numbers where a column has a list of names that are mixed with rehearsals and another column that has a value of profits to this name list.

    Now, I want to determine the total profits from each of the names so I can see the total profit by name.

    That part is easy, I just a SUMIF function that checks if the name corresponds to a specific name, and then adds the benefit altogether.

    The problem I have is that in the names column, sometimes I'll have a name and then the next rows are just '-' indicating that they are of the same name. The SUMIF function that I use does not takes into account these values because they obviously do not match the name of the interest.

    So my question is: is it possible to create a function that will check for a matching name and then if the next line '-', then add this value to the total as well. It has to work with several rows of '-' after the name.

    The screenshot below is an example of what I mean because I realize that it does not have much sense.

    So in this case, the total of Jess profit would be = 5 + 35 + 15 + 5 + 15 = 75

    and the benefit of Gill = 30 + 30 + 20 + 40 = 120

    I hope I did it is clear enough. Thank you in advance!

    Oscar

    Hi Oscar,.

    Although it is possible to do, it will be a little clumsy, involving additional columns. It would be much easier to stop using the "-" and use the actual names instead. Order the popup format to create a list that makes it easy to list the names.

    Quinn

  • draw the line in graph (picture) xy

    Hi all

    I place an image in xy graph that I allow to annotate some of the indicators.

    After I put the flag in a place in xy graph (picture) I want to draw lines between indicators.

    can someone help me with this? I'm using LABVIEW 8.2.1

    Sorry for my English.

    Take a look at my example of the past.

    Here; rapid s and diry draft amendment to your VI, see if it works for you. (the lines are drawn between annotations when you press OK).

  • Draw the line in ImageView

    I need to create something like this:

    The line should vary according to consumption, the rest already calculated just need to know how can draw.

    Can you help me?

    concerning

    BlackBerry have simply copied the documentation QT everywhere so proceed with caution.

    I haven't used QLine, but this is a class to represent a line (vector) and therefore does not draw anything this either himself comes to classes of Q What to do.

  • Need to draw the line &amp; bargraph on Blackberry using JDE 4.7

    Hello

    I need to draw a line and a graphic barcode using JDE 4.7.

    can someone help me find the starting point.

    Thanks in advance.

    The forum search will often provide an answer.

    http://supportforums.BlackBerry.com/T5/Java-development/how-implements-a-chart-on-BlackBerry/m-p/465...

  • Draw the line width problem

    Hello

    1. work on the version of BB storm (9500/9530 Simulator) is v4.7.0.75
    2 opportunity BB JDE 4.7
    3. the request is:

    I want to draw a line with my own thickness as in 'C' we have a setPenStyle method. is there a method that will do the operation similar to the blackberry.

    Thank you

    Sendhil Kumar V

    Try this forum,

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=19608&view=by_date...

    See if it helps,

    Try drawFilledPath(),

  • Illustrator CC 2015, need to draw the line after line with arrowhead already attached.

    CorelDesigner has an option where you just draw your line / lines and arrow is already added at the end of the line.  Not only that your arrow lines can have a color outside the line (which surround it). So if you make a technical with arrows pattern when placed on top the drawing there is white or what ever color you want outside the black line (what thickness you choose so) so it's easier to read the technical drawing. So, basically, it's not line against line. That's why you would put a little white around the line. He gives him the space to breathe and easier to read the technical drawing. In Illustrator, I find that I draw my line. Then hover over the line options palette, and then scroll down arrow heads and choose my arrow head. Then calculate the rest, make outside the line have a white that surrounds it. Thus, it can be placed on technical drawings. I find there are many steps I have to do when Corel has this feature built-in and you leave. I currently have a trial version of Corel. But... I already have Adobe Suite. I don't want to have to buy another program. But I also see that CorelDesigner is somehow more user-friendly for people who need to work with drawings technical line (writing). I understand that not every program offers the same tools. But I really need the speed of it because I work with a lot of technical CAD which are handed to me. If there is a way in Illustrator to draw my lines one after the other with the arrow head already attached? Then of course I need little white around it if its duplication on other technical lines.  It just seems like a lot of steps in Illustrator. I also understand I could draw a line w/arrow attached installer as I want. Then draw another line... use the eyedropper tool and click on the correct line and my other line with change. Once more... what a pain. I feel that I have to jump through hoops to get my final result. I hope so that there's something built in Illustrator, I did not know was there and just unnoticed.

    Yes, I was able to do, but this is delicate (buggy) to get there.

    Make sure that the two traits have identical points of arrows and line widths.

    After you have created your effect of offset on long-distance running, move the effect of shifting way somewhere else in the stack, and then put back where it was. This seems to be the only way to make it work. Weird.

  • Arrows appear when you try to draw the line in Photoshop

    Sorry for the noob question, but when I try to draw a line in Photoshop, I get only an arrow.  Can someone tell me how to solve this problem?  Thank you!

    If you use the online tool, make sure that you do not have the arrow heads selected by clicking the gear icon.

  • Ungroup a group and keep the scriptlabel for each item in the Group

    Hello

    does anyone know how to ungroup a group of rectangles with a certain tag (example groupA) give one every rectangle a clean label (the same text groupA)

    I can find the Group and ungroup it but I can't label the rectangles...

    var oPageItems = app.activeDocument.allPageItems;

    for (var j = oPageItems.length - 1;)  j > = 0; d-) {if (oPageItems [j] .label == ("groupA")) {oPageItems [j] .ungroup ()))}}

    ...???

    Help, please

    Hello

    front

    oPageItems [j] .ungroup ();

    go through the loop and set a label for each item within the Group:

    for (var k; k)< opageitems[j].length;="">

    oPageItems [j] [k] .label = "groupA";

    assuming that your oPageItems [j] is a group indeed.

    I hope that...

  • Draw the line or a race on layer

    Hello members,

    First of all, thanks to the Adobe forums for the exceptional level

    information and assistance in the forums I frequent!

    I searched around, but could never quite figure out how to

    this: a "ball" or a circle moves on a map from City A to city B to C.

    etc.  As my small ball moving a nice 'on-line' traces on the map

    (a brush stroke?).

    I've seen tutorials on writing a signature, but those who come

    reveal what is already under (Ahron Stern, signature on the one hand,

    and another of Layers Magazine).  What is a good way to draw a line

    following just the ball as it moves on the map?

    I currently have four layers.  In the lower part is the card, then a

    solid black, with an opacity to about 45 or 50 percent.

    the layer on top of the solid is a bunch of points and names of cities (no here, just change opacity animation),

    points and the text are more corresponding to the names of cities on the map.

    The top most layer is the object (a small circle) I want

    move from town to town, with a line tracing the trajectory of the ball.

    I want that ball to move from one point to the other, following a path based on the routes on the map.

    As the ball moves, a line is drawn on the path along the road.

    I have checked around on it, but have yet to find a way to achieve this.

    Thank you

    ewholz

    Add another solid. Add a mask path that matches the path of your bouncing ball. You can do this just by selecting all the keys to position your ball layer, copy images, and then start a new mask at least 1 vertex on the new solid and paste.

    Now apply stroke on transparent and animate the end point or start point of the race. EZ as pie and a search on Google for "lively route tutorial evokes this video covers the basics." I took about 10 seconds for the scanner and it will show you how to draw a mask and animate a stroke.

Maybe you are looking for