Please enable JavaScript to view this site.

CWT User Interface Design Handbook

Navigation: TFT Controls

ImageRotator (TFT)

Scroll Prev Top Next More

Requirements

CWT Compact CPU Board 0501-E0150 Rev F or later

TFT display

OS 1.0.0.17 or later

Application 3.2.1.6 or later

 

Description

ImageRotators for TFT are configured in panels in the ui.xaml. When an ImageRotator is shown it shows the first image in a given ImagePath and then, after a given Interval in miliseconds, it shows the next image until all images are displayed. The rotator then starts over again. The order is the image name.

 

Limitations

The interval between images should be greater than 20ms.

ImageRotators in popups with timeout are not recommended since the timeout will freeze the ImageRotator.

Image file type must be .png.

 

Properties

ImagePath

Type/Value: String of any length

Description:Folder path to the collection of images

Folder location: We recommend to place this folder inside the \Media folder. E.g. \Storage Card\Media\Rotator\

Interval

Type/Value: Unsigned integer.

Starting at 200. Representing [ms]

Description:The period of time when to swap image to the next in the collection of images. The lowest period is limited to 200ms.

Location

Type/Value: String in format “X,Y” where X and Y are both unsigned integers. Value range for X is 0–260 and value range for Y is 0–128.

Description:The Location property specifies where the image shall be placed in relation to the parent control.

If an image is defined in a panel, the Location property will specify where inside the panel the image will be positioned. The physical location on the display depends on where the panel is placed (panels also have a location property) and where the image is placed within the panel.

Name

Type/Value: String of any length

Description:The name of the Image control. Remember that the name must be unique within the same panel.

RunOnce

Type/Value: Boolean, “true” or “false”

Description:The RunOnce property defines if the image rotator should stop at the last image.

StartOver

Type/Value: Boolean, “True” or “False”

Default:False
Description:If set to True, the ImageRotator will start over again when the pop-up or panel is displayed again.
It set to False, the rotator will continue where it left of when the previous pop-up closed.

Examples

The image rotator definition below renders the bitmaps located in in the folder “\Storage Card\Media\Rotator\”. The ImageRotator control is given the name “MyImageRotator”, but in this case the name is not important. The images in given folder is displayed one at a time with at period of 500ms.

<TFT:ImageRotator Name='MyImageRotator'
  Location='0,0'
  Interval='500'
  RunOnce='true'
  ImagePath='\Storage Card\Media\Rotator'/>