4

Quick question; In C#, Windows Forms, is it not possible, to have a System.Windows.Forms.TrackBar show all its values, next to its ticks? I have not been able to find any way of doing this, which suprises me abit. Is there another way, to get this behavior? I really would like to avoid, creating 25 labels, and writing on them.

H H
  • 263,252
  • 30
  • 330
  • 514
Nicolai
  • 2,835
  • 7
  • 42
  • 52
  • 3
    http://stackoverflow.com/questions/625728/winforms-volume-slider-trackbar-user-control http://www.codeguru.com/csharp/csharp/cs_controls/custom/article.php/c12101 – Konrad Morawski Dec 06 '11 at 12:02

1 Answers1

5

You can achieve this by creating a User Control with the TrackBar in it and generate labels at runtime (placement of the labels goes according to tick values).

I did something similar some time ago with a ProgressBar instead of TrackBar, but the logic should still apply. Don't have code at hand right now I'm afraid, will try to dig it up.

Alex
  • 23,004
  • 4
  • 39
  • 73