Site icon Learn C++

Quickly Learn About Basic Windows C++ Components (QuickLook Part 4)

TrackBar

Trackbar is a slider on the form that allows users to get numeric values by dragging the track. A track bar can set integer values on a continuous range. It is useful for adjusting properties like color, volume and brightness. The user moves the slide indicator by dragging it to a particular location or clicking within the bar.

We can set its Oriantaion to Horizantal or Vertial. We can setMin, Max and its Value defaults on its properties, or you can set as below.

[crayon-67413f5ab9adf873874424/]

We can read value change by using OnChange() event. To create OnChange() event just double click on it and we can use as below.

[crayon-67413f5ab9ae7229089360/]

SpinBox

SpinBox is another method to get numeric values by the value entered or by increase and decrease buttons. it has a special edit box equipped with buttons to increment or decrement. We can setMin, Max and its Value defaults on its properties, or you can set as below.

[crayon-67413f5ab9ae9267767341/]

We can create OnChange() event just double click on it and we can use as below.

[crayon-67413f5ab9aea716123564/]

ScrollBar

ScrollBars are the most used things on pages to slide view left or right up or down. It represents a standard scroll bar that is used to scroll the contents of a window, form, or a control.

They are generally aligned to controlled thing, to Left or Right in Vertical or Top or Bottom in Horizontal. We can set its Orientation to Horizontal or Vertical. We can set Min, Max and its Value defaults on its properties, or you can set as below.

[crayon-67413f5ab9aeb229962154/]

We can create OnChange() event just double click on it and we can use two ScrollBars to get vertical and horizontal x and y parameters as below.

[crayon-67413f5ab9aec346763988/]

We can create OnChange() event just double click on it and we can use as below.

SmallScrollBar

SmallScrollbar is tiny version of ScrollBar. They are useful in some small areas, hard to change by touch operations. It represents a standard scroll bar that is used to scroll the contents of a window, form, or a control.

They are generally aligned to controlled thing, to Left or Right in Vertical or Top or Bottom in Horizontal. We can set its Orientation to Horizontal or Vertical. We can set Min, Max and its Value defaults on its properties, or you can set as below.

[crayon-67413f5ab9aee394995899/]

We can create OnChange() event just double click on it and we can use two SmallScrollBars to get vertical and horizontal x and y parameters as below.

[crayon-67413f5ab9aef804806787/]

ArcDial

 TArcDial is a general-purpose knob-style rotating button. We can use it as button in applications wherever you need to provide the user with a rotating button that resembles a knob. This arc dial control variates its Value in degrees, so if you want to use it as a linear control for varying the progress of a progress bar, for instance, you need to programmatically make a conversion from degrees to linear movement.

[crayon-67413f5ab9af0528912657/]

We can create OnChange() event just double click on it and we can use to get parameters as below.

[crayon-67413f5ab9af1886097029/]

Exit mobile version