Table of contents



Official Content

Sometimes you need to navigate through the values a field can take. The wheel control has gained popularity with the touch screen interface and is widely used in such cases. You can scroll through an Enumerated Domain or Numeric values to select the value you want.

In this article, the most important concepts of the wheel control are explained and there is an example on how to use it.

This control applies to the following data types:

Samples

The following Transaction object will be used with the Work With pattern applied.

WheelControlTRN

The Transaction contains an attribute based on an Enumerated Domain (TrnCustomersEnumerated) and an attribute based on the Numeric data type (TrnCustomersNumWheel).

Enumerated Domain:

WheelControlEnumDomain

To enable the control, go to the Section (General) under the Detail node, and select the Edit layout. Select the Numeric attribute (TrnCustomersNumWheel) and change the Control Type property to Wheel.

WheelControlNumericProperties-GeneXus17

This will enable some other properties.

General Wheel properties

Notify Context Change This property is used for event handling.
Display Style "Inline" or "As a picker" values. You can select how this control is seen. The default value is "As a picker". This property has an effect only in Apple devices. For Android devices, the wheel control is always displayed as a picker. This restriction is imposed by the platform itself.
Cyclic You can enable this property if you want the last value to be continued by the first one.

 

For Numeric based attributes:

Step The incrementation from one value to another.
Min Value The minimum value the control will show to select.
Max Value The maximum value the control will enable you to select.


For the Enumerated attribute let's do the same:

Control type Wheel
 

WheelControlEnumProp-GeneXus17

There are no particular properties enabled, just the General Wheel control properties.

Done, press F5.

The following pictures show you the wheel control according to its attributes.

Numeric as a Picker:

WheelControliPadNum

Enumerated As a picker:

WheelContrloiPadEnum

Numeric Inline:

WheelControliPadInline

Numeric with decimals:

The wheel control can also be applied to a field based on a numeric with decimals. For example:

WheelControlDecimalTRN

WheelControlDecimalPattern-GeneXus17

When using decimals you can specify decimal step (in the example 0.02) and after deploying the application the control is displayed as follows:

WheelControlDecimalImage

See Also

HowTo: Use MultiWheel Control

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant