Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2004
    Posts
    72

    Unanswered: colorize partial cell in rowset of listview... based percentage

    see the image of my listview...
    I want colorize each cells in rowset based the percentage in cells, how to? is possible?

    for example:
    if the percntage is 50% colorize half cell
    if the percentage is 25% colorize 1/4 of cell
    ....

    ecc

    i use this to insert percentage:
    ITM.SubItems(5) = Format((VALORE_3 / VALORE_1 * 100), "#,##0.00")
    Attached Thumbnails Attached Thumbnails Immagine1.JPG  

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    effectively what you want is a variant of a progress bar.
    if you cannot track down a suitable control

    an alternative is to write your own user control
    what you want to do isn't that difficult...
    ..effectively you have 2 possibly 3 boxes (one is the border/background, one is the percentage) arguably you could consider say a third box under the number so the text is always legible.
    however it may require a bit of trickery / experimentation to make sure it resizes, consider things like a minimum size.
    you could expnad it to say have a multi coloured boxes.
    the colour of box indicates the state (red:action required, yellow:warning & green ok)
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Oct 2004
    Posts
    72
    Quote Originally Posted by healdem
    effectively what you want is a variant of a progress bar.
    if you cannot track down a suitable control

    an alternative is to write your own user control
    what you want to do isn't that difficult...
    ..effectively you have 2 possibly 3 boxes (one is the border/background, one is the percentage) arguably you could consider say a third box under the number so the text is always legible.
    however it may require a bit of trickery / experimentation to make sure it resizes, consider things like a minimum size.
    you could expnad it to say have a multi coloured boxes.
    the colour of box indicates the state (red:action required, yellow:warning & green ok)
    ????????? sorry but i dont understand...
    In other case tks for suggestion.

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Progress bar control?
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  5. #5
    Join Date
    Oct 2004
    Posts
    72
    Quote Originally Posted by loquin
    Progress bar control?
    Hi loquin...
    No pregressbar... but simple to colorize the bacground of item based value...


    for example:
    if the value in item is 50, colorize half cell
    if the value in item is 25, colorize 1/4 of cell
    ecc...

  6. #6
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    and, what we are saying is that you should USE progressbar controls, rather than a listview.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •