Assign Color Programmatically to Listview Item Rows?

Discussion in 'AutoCAD' started by Rudderdl, Nov 30, 2004.

  1. Rudderdl

    Rudderdl Guest

    I have a listview in a form where I want to assign a color to rows where the row has a link to an entity in Acad. I have a way to get all the linked rows and stuff.... but I have no idea of how to assign a color per row of all matching listview rows (its a controls question I guess) ... I want to assign a backcolor of yellow for each row of matching criteria and normal color to rows where the criteria is not matched...

    ANY ideas or solutions would be appreciated...
    Don
     
    Rudderdl, Nov 30, 2004
    #1
  2. Don,

    I looked at the documentation for both the listview and listitem objects.
    Looks like it is not possible to change the color of a row. I would suggest
    another way to flag the presence of a link: how about using an icon. The
    presence of an icon indicates a linked row, the absence means no link.

    Gilles

    the row has a link to an entity in Acad. I have a way to get all the linked
    rows and stuff.... but I have no idea of how to assign a color per row of
    all matching listview rows (its a controls question I guess) ... I want to
    assign a backcolor of yellow for each row of matching criteria and normal
    color to rows where the criteria is not matched...
     
    Gilles Plante, Nov 30, 2004
    #2
  3. Listview items can have small icons.
    Why not asign a simple yellow icon to the items matching your criteria
    and leave the rest with a blank icon.
     
    Jorge Jimenez, Nov 30, 2004
    #3
  4. Rudderdl

    Rudderdl Guest

    Icons it is - thanks.... I was succesful however assigning text color and making it Bold... Red Bold Text to represent linked -

    an icon will make the client happier tho I'm sure - I'll make their company logo into a tiny icon (smoke & mirrors LOL)

    Thanks
     
    Rudderdl, Nov 30, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.