Click or drag to resize
Ranorex

GeometryCalculateEnsureVisibleScrollPixels Method (Rectangle, Rectangle, Boolean)

Calculates scroll pixels for EnsureVisible operations.

Namespace:  Ranorex.Core
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static Point CalculateEnsureVisibleScrollPixels(
	Rectangle container,
	Rectangle item,
	bool favorTopLeft
)

Parameters

container
Type: System.DrawingRectangle
A container rectangle.
item
Type: System.DrawingRectangle
An item rectangle.
favorTopLeft
Type: SystemBoolean
If set to true, the top-left corner of the item is made visible if the whole item cannot be made visible.

Return Value

Type: Point
The pixels the containers needs to be scrolled in order to make the item visible.
See Also