C++C++11C++14C++17ComponentsLanguage FeatureLearn 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.

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

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.

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

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.

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.

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.

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.

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.

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

close

Oh hi there 👋
It’s nice to meet you.

Sign up to receive awesome C++ content in your inbox, every day.

We don’t spam! Read our privacy policy for more info.

About author

33+ years of coding with more than 30+ programming languages, mostly C++ on Windows, Android, Mac-OS, iOS, Linux and some other operating systems. Dr. Yilmaz Yoru was born in 1974, Eskisehir-Turkey. He graduated from the department of Mechanical Engineering of Eskisehir Osmangazi University in 1997. One year later he started to work in the same university as an assistant. He received his MSc and PhD degrees from the same department of the same university. He has married and he is a father of a son. Some of his interests are Programming, Thermodynamics, Fluid Mechanics and Artificial Intelligence. He also likes the graphical 2D & 3D design and high-end innovations.
Related posts
C++C++11C++14C++17Introduction to C++Learn C++

This Is How To Get A Substring of a Wide String in C++

C++C++11C++14C++17Introduction to C++Learn C++

How To Access Individual Character Elements Of A C++ String

C++C++11C++14C++17Introduction to C++Learn C++

The Right Way To Access Character Elements Of A Wide String

C++Language FeatureLearn C++

You NEED to Learn To Use JSON (JavaScript Object Notation)

Worth reading...
Introduction To C++ Windows Development With C++Builder
en_USEnglish