Toolbar

The attributes and functions explained on this page can be found in the Toolbar category.

The controls in the toolbar can be used to interactively perform various actions that are otherwise only accessible via the attributes. Each element can be shown or hidden. In addition, the entire toolbar can be adjusted in height or completely hidden.

The positioning of the elements in the toolbar is fixed and cannot be customized. If such adjustments are nevertheless necessary, you can hide the corresponding elements using the ToolbarItems property, implement them yourself with your own controls and place them on the Image Control toolbar.

The available toolbar elements are divided into the General and History groups. The individual elements are described below for each group from left to right, the General group starts with the displayed choice of the Result image:

Toolbar 1:

Category: General

ImageSelection

Combo box for selecting images from the image list to be displayed (see ImageList property in the Common category). Only displayed if the image list contains at least one element. When switching between images, expect a short loading time.

ScaleSelection

Combo box for selecting specific scaling values to adjust the current image. The selectable scaling values can be adjusted via the ScaleOptions property.

If ScaleSelectionEditable is deactivated while a user-defined scale is set, the combo box will no longer display a value. This is the default behavior of the combo box control.

ShapeButton

Button for setting the value of the ScaleSelectionActive property. If active, an existing shape is displayed and can be edited. If no shape is displayed, a new one can be drawn.

FreezeButton

Button for setting the value of the ImageFreeze property. If active, the currently displayed image is fixed and will not be updated.

DownloadButton

Button for downloading the current image with default name (see downloadImage function under Image download). To assign a different file name, this button can be implemented by the customer and then call the function with a self-defined name.

Category: History

QueueIndex

Input value of the index for the choice or display of the specified history image when ImageFreeze is activated. 0 corresponds to the last image received.

NavigationButtons

Buttons to go forward or back one image entry in the image history when ImageFreeze is activated.

NavigationEndButtons

Buttons to jump to the first or last image received in the history when ImageFreeze is activated.

Toolbar 2:

Functions also programmatically accessible

Any action that is accessible through the interface elements of the toolbar is also accessible programmatically through the properties of the control.

Size settings

The toolbar offers several customization options, for example, the height can be adjusted via the ToolbarHeight property. Furthermore, the width of individual elements can be adjusted using the ImageSelectionWidth, ScaleSelectionWidth and QueueIndexWidth properties. The width of all buttons is automatically adjusted to the height of the toolbar so that they are square.

The width of the dropdown button of the combo boxes cannot be adjusted, because this functionality is not available in the standard combo box control.

Internally, the ToolbarHeight property is limited to a maximum of 150 pixels.

Background color

The background color of the toolbar is a semi-transparent white "rgba(255, 255, 255, 0.5)" by default or R: 255, G: 255, B: 255, A: 127 and can be customized using the BarColor property in the Colors category.

Advanced settings

Further graphical settings (e.g. font of the combo boxes) can be changed via Themed Resources. Basically, attributes of the combo boxes, text blocks, and numeric input are provided. Themed Resources can be customized in the Theme editor at TcHmiVnImage > Themed Resources. These settings will then apply to all instances of the Image Viewer control.