Dropdown

Description

The Dropdown class represents UI elements that are consisting of a text field (which can be editable or not) and a dropdown list that can be expanded by clicking in the text field or on an optional dropdown button. The dropdown list can include a scroller to scroll through the possible selections. The dropdown is identified on the screen by the Hotspot of the image given in the constructor, which should be placed within the text field. If there is no closed border around the text field, this implementation will not support this dropdown type.

The Dropdown object uses a TextBox object, a Button object and an ItemList with an optional Scroller.

Namespace: Progile.TRIO.BaseModel Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)

Inheritance Hierarchy:

Object Progile.TRIO.BaseModel.OnScreenElement Progile.TRIO.BaseModel.Dropdown

Constructors

Creates a new Dropdown instance, that can be found with a text search for dropdownLabelText within the provided filters.

Syntax:

public Dropdown(
	IAppBasics appBasics, 
	string displayName, 
	string dropdownLabelText, 
	params IImageFilter[] filters
)

Parameter

Description

appBasics

displayName

dropdownLabelText

[filters]

Creates a new Dropdown instance. Dropdown Textbox will be defined by the visible closed border around the Hotspot of the provided image. If an image for the Dropdown button is provided, it will be used to open the dropdown list, otherwise the dropdown is opened simply by clicking in the textbox.

Syntax:

public Dropdown(
	IAppBasics appBasics, 
	string displayName, 
	ImageReference imageReference, 
	bool useVisualSense, 
	params IImageFilter[] filters
)

Parameter

Description

appBasics

displayName

imageReference

useVisualSense

[filters]

Creates a new Dropdown instance. Dropdown Textbox will be defined by the visible closed border around the Hotspot of the provided image. If an image for the Dropdown button is provided, it will be used to open the dropdown list, otherwise the dropdown is opened simply by clicking in the textbox.

Syntax:

public Dropdown(
	IAppBasics appBasics,
	string displayName,
	ImageReference imageReference,
	ImageReference buttonImage, 
	bool useVisualSense,
	params IImageFilter[] filters
)

Parameter

Description

appBasics

displayName

imageReference

buttonImage

useVisualSense

[filters]

Methods

Name

Description

Opens the dropdown list and returns a rectangle for the list (based on rectangle with changes after expanding dropdown list)

Opens the dropdown list and verifies if the provided value is present in the dropdown list (includes scrolling). Closes the dropdown list again.

Properties

Name

Description

The size of the kernel that is used to blur the images when detecting the changes to define the list rectangle. Size 0 means no blur, a common value for moderate blurring is 8 (approx. the size of a character). Default: 0

The image detection parameters that are used to find an image entry in the dropdown list.

Width of the border of the list that will be cut away on all sides to remove a border from the image that is passed to the OCR algorithm. Default: 3

Determines whether the mouse should be moved in the middle of the dropdown list in order to focus the scroller of the list. Can cause problems with list entries that have tooltips. Default: false

The tolerance value for changes that shall be ignored when detecting the changes to define the list rectangle. Default 0.04

Protected properties

Name

Description

The dropdown button used to open the dropdownList. Either coming from provided buttonImage in Dropdown ctor or just the Textbox itself (works in most dropdowns).

Last updated