JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Setting Track Bar Ticks

You also can configure track bars with the TickStyle property, which lets you determine how ticks are displayed; this property can take values from the TickStyle enumeration:

  • Both- Tick marks are located on both sides of the control.

  • BottomRight- Tick marks are located on the bottom of a horizontal control or on the right side of a vertical control.

  • None- No tick marks appear in the control.

  • TopLeft- Tick marks are located on the top of a horizontal control or on the left of a vertical control.

You also can set the tick frequency-which sets the distance between ticks-with the TickFrequency property (default = 1).

For example, I've set the TickStyle of the track bar you see in Figure 8.13 to TopLeft, the Maximum property to 100, and the TickFrequency property to 5.

Figure 8.13: Setting tick style and frequency in a track bar.
Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor