Results 1 to 2 of 2

Thread: progress bar as an "image" in treeview or listview.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Stockholm, Sweden
    Posts
    316

    progress bar as an "image" in treeview or listview.

    Hi,

    Well, I suppose the titel of this thread is stupid, but being a beginner I have no idea what to ask for.

    I have a MDI child form with a treeview control populated from a db. The user can drag items from the treeview into another treeview and also rearrange them in the second treeview. Whenever the orde changes, the db calculates the value of the position as a percentage of the top position, so that the item in the top gets 100% and the second item get a little less depending on the number of items in the treeview, thus creating an even distribution from 0% to 100%. All of this works.

    Now I want to display the value of the position as some sort of progress bar (well that might be the wrong name, but you know what I mean.) so that the treview show the item name, followed by a line that indicates a value.

    In Access, you would do this with a subform containing a control, but how do you do it in VB 2005 express?

    Fuga.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: progress bar as an "image" in treeview or listview.

    Set the DrawMode property of the tree to one of the OwnerDraw values, then handle the DrawNode event. If you actually want to display a ProgressBar then you can use a ProgressBarRenderer to draw the UI without the actual control.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width