C++C++11C++14C++17Language FeatureLearn C++

Quickly Learn About Basic Windows C++ Components (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.

Related posts
C++Learn C++Videos

Learn C++ With Design Patterns For Handling/Reporting Errors In C++: Parallel Algorithms And Executors by Mark Hoemmen (CPPCon 2020) Videos

C++Introduction to C++Learn C++

Learn To Use Break And Continue In Loops With C++

C++Introduction to C++Learn C++

Learn To Define And Use Arrays In C++

C++Learn C++Videos

Learn C++ With Back to Basics: Design Pattern by Mike Shah (CPPCon 2020) Video

Worth reading...
Learn Basic Components in C++ Builder (Quick Look Part 1)
en_USEnglish