VbWindow description properties

Object description properties can be used in the object repository description, in programmatic descriptions, in checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

The VbWindow test object supports the description properties listed in the table below.

Property Name

Description

abs_x

The object's absolute x-coordinate (left) relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.

If you are working with multiple monitors, the coordinate in the secondary monitor is relative to the primary monitor.

For example, given a resolution of 1280 x 1024 in the primary monitor, if the secondary monitor is positioned to the right of the primary monitor, the x-coordinate is 1280 or greater. If the secondary monitor is placed to the left of the primary monitor, the x-coordinate is negative.

abs_y

The object's absolute y-coordinate (top) relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.

If you are working with multiple monitors, the coordinate in the secondary monitor is relative to the primary monitor.

For example, given a resolution of 1280x1024 in the primary monitor, if the secondary monitor is positioned below the primary monitor, the y-coordinate is 1024 or greater. If the secondary monitor is placed above the primary monitor, the y-coordinate is negative.

BackColor

The background color of an object.

BorderStyle

The object's border style.

caption

The text displayed in or next to the object.

Class Name

The object's class.

ControlBox

Indicates whether the Control menu box is displayed on a form at run-time.

Possible values:                     
    True
    False

count

The number of objects in a collection.

CurrentX

The horizontal coordinates for the next print or draw method.

CurrentY

The vertical coordinates for the next print or draw method.

DrawMode

Indicates the appearance of output from a graphics method.

Possible values:

1 (VbBlackness):Black.

2 (VbNotMergePen): Inverse of setting 15 (Merge Pen).

3 (VbMaskNotPen): Combination of the colors common to the background color and the inverse of the pen.

4 (VbNotCopyPen): Inverse of setting 13 (Copy Pen).

5 (VbMaskPenNot): Combination of the colors common to both the pen and the inverse of the display.

6 (VbInvert): Inverse of the display color.

7 (VbXorPen): Combination of the colors in the pen and in the display color, but not in both.

8 (VbNotMaskPen): Inverse of setting 9 (Mask Pen).

9 (VbMaskPen): Combination of the colors common to both the pen and the display.

10 (VbNotXorPen): Inverse of setting 7 (Xor Pen).

11 (VbNop): No operation - output remains unchanged. In effect, this setting turns drawing off.

12 (VbMergeNotPen): Combination of the display color and the inverse of the pen color.

13 (VbCopyPen): Color specified by the ForeColor property.

14 (VbMergePenNot): Combination of the pen color and the inverse of the display color.

15 (VbMergePen): Combination of the pen color and the display color.

16 (VbWhiteness): White.

DrawStyle

Indicates the line style for output from graphics methods.

Possible values:

0 (VbSolid):Solid.
1 (VbDash):Dash.
2 (VbDot):Dot.
3 (VbDashDot):Dash-Dot.
4 (VbDashDotDot):Dash-Dot-Dot.
5 (VbInvisible):Transparent.
6 (VbInsideSolid):Inside Solid.

Note: If the DrawWidth property is set to a value greater than 1, DrawStyle settings 1 through 4 produce a solid line. If the DrawWidth property is set to 1, DrawStyle produces the effect described above for each setting.

DrawWidth

The line width (in pixels) for output from graphics methods.

Default = 1 (1 pixel wide)

enabled

Indicates whether the object is enabled.

Possible values:                     
    True
    False

FillColor

The color used to fill in shapes, circles, and boxes.

FillStyle

Indicates the pattern used to fill shapes, circles, and boxes.

Possible values:

0 (VbFSSolid): Solid.
1 (VbFSTransparent): Transparent.
2 (VbHorizontalLine):Horizontal Line.
3 (VbVerticalLine):Vertical Line.
4 (VbUpwardDiagonal):Upward Diagonal.
5 (VbDownwardDiagonal):Downward Diagonal.
6 (VbCross):Cross.
7 (VbDiagonalCross): Diagonal Cross.

focused

Indicates whether the object has the focus.

Possible values:                     
    True
    False

FontBold

Indicates whether the font style is bold.

Possible values:                     
    True
    False (Default)

FontItalic

Indicates whether the font style is italic.

Possible values:                     
    True
    False (Default)

FontName

The font used to display text in the control.

FontSize

The size (in points) of the font used for text displayed in the control.

FontStrikethru

Indicates whether the font style is strikethrough.

Possible values:                     
    True
    False (Default)

FontTransparent

Indicates whether background text and graphics are displayed in the spaces around characters.

Possible values:                     
    True (Default)
    False

FontUnderline

Indicates whether the font style is underlined.

Possible values:                     
    True
    False (Default)

ForeColor

The color of the object's text.

Foreground

Indicates whether the object is the foreground object (whether the object is currently active).

HasBorder

Indicates whether the object has a thin-line border.

HasCaption

Indicates whether the object has a title bar.

HasDC

Indicates whether a unique display context (or hDC) is allocated to the control.

Possible values:                     
    True (Default)
    False

HasHScroll

Indicates whether the object has a horizontal scroll bar.

HasSizebox

Indicates whether the object has a sizing border.

HasSystemMenu

Indicates whether the object has a window menu on its title bar.

HasVScroll

Indicates whether the object has a vertical scroll bar.

height

The object's height (in pixels).

HScrollPageSize

The horizontal page size. The scroll bar uses this value to determine the approximate size of the scroll box. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

HScrollPosition

The position of the horizontal scroll box. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

hWnd

The handle of the run-time object's window.

index

The ordinal identifier that UFT One assigns to the object to indicate the order in which the object appears in the code relative to other objects with an otherwise identical description. This property cannot be used with GetROProperty.

Values begin with 0.

is child window

Indicates whether the object's window is a child window.

Possible values:                     
    True
    False

is owned window

Indicates whether the object's window has an owner window.

Possible values:                     
    True
    False

IsMdiChildWindow

Indicates whether the object is a multiple-document interface (MDI) child window.

IsPopupWindow

Indicates whether the object is a pop-up window.

IsToolWindow

Indicates whether the object is a tool window (a window intended to be used as a floating toolbar).

KeyPreview

Indicates whether keyboard events for forms are invoked before keyboard events for controls. The keyboard events are KeyDown, KeyUp, and KeyPress.

Possible values:                     
    True
    False (Default)

left

The distance between the internal left edge of an object and the left edge of its container.

LeftScrollbar

Indicates whether the vertical scroll bar is positioned on the left of the object.

location

The ordinal identifier that UFT One assigns to the object to indicate where the object appears within the window, frame, or dialog box. Values are assigned from top to bottom, and left to right. This property cannot be used with GetROProperty.

Values begin with 0.

MaxButton

Indicates whether the form has a Maximize button.

Possible values:                     
    True (Default)
    False

MaxHScrollPos

The maximum horizontal scrolling position. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

Maximizable

Indicates whether the object can be maximized.

Maximized

Indicates whether the object is maximized.

MaxVScrollPos

The maximum vertical scrolling position. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

MDIChild

Indicates whether the form is displayed as an MDI child form inside an MDI form.

Possible values:                     
    True
    False (Default)

MinButton

Indicates whether the form has a Minimize button.

Possible values:                     
    True (Default)
    False

MinHScrollPos

The minimum horizontal scrolling position. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

Minimizable

Indicates whether the object can be minimized.

Minimized

Indicates whether the object is minimized.

MinVScrollPos

The minimum vertical scrolling position. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

moveable

Indicates whether the object can be moved.

Possible values:                     
    True
    False

name

The object's name.

NativeClass

The object's window class name.

PaletteMode

Indicates which palette is used for the controls on an object.

Possible values:

0 (vbPaletteModeHalfTone): The Halftone palette.

1 (vbPaletteModeUseZOrder): The palette from the topmost control that has a palette.

2 (vbPaletteModeCustom): The palette specified in the Palette property.

3 (vbPaletteModeContainer): The container's palette for containers that support the ambient Palette property.

4 (vbPaletteModeNone): Does not use any palette.

5 (vbPaletteModeObject): The ActiveX designer's palette.

RegExpWndClass

The permanent part of the MFC window class.

RegExpWndTitle

The constant part of the window title.

RightAligned

Indicates whether the object has generic "right-aligned" properties.

RightToLeft

Indicates the display direction and visual appearance of the text on a bi-directional system.

Possible values:

True: The control runs on a
bi-directional platform, such as Hebrew Windows95, and text runs from right to left. The control modifies its behavior, such as putting vertical scroll bars at the left side of a text or list box, putting labels to the right of text boxes.

False: The control act as though it were running on a non-bidirectional platform, such as English Windows95, and text runs from left to right.

RightToLeftLayout

Indicates whether the object's horizontal origin is on the right edge.

RightToLeftReading

Indicates whether the object's text is displayed using right-to-left reading-order properties.

ScaleHeight

The number of units for the vertical measurement of an object's interior.

ScaleLeft

The horizontal coordinates for the left and top edges of an object.

ScaleMode

The measurement units for object coordinates when using graphics methods or positioning controls.

ScaleTop

The vertical coordinates for the left and top edges of an object.

ScaleWidth

The number of units for the horizontal measurement of an object's interior.

ShowInTaskbar

Indicates whether a Form object appears in the task bar.

Possible values:                     
    True
    False (Default)

StartUpPosition

Indicates the object's original position.

Possible values:

0 (vbStartUpManual): No initial setting specified.

1 (vbStartUpOwner): Centered on the item to which the UserForm belongs.

2 (vbStartUpScreen): Centered on the whole screen.

3 (vbStartUpWindowsDefault): Positioned in the upper-left corner of screen.

tag

An expression that stores any extra data needed for your program. This property is generally used to identify objects.

TestObjGenType

The object's generic type, for example, text box, list box, or table.

TestObjName

The object's name as it appears in the object repository. This property cannot be used with programmatic descriptions or as a description property for the ChildObjects method.

If the object is not found in the object repository, the TestObjName is defined as follows:

  • If the object is found in the application, UFT One uses the value of the property it normally uses when adding this object to the object repository, surrounded by [ ].

  • If the object is not found in the application, UFT One uses the value of the object's Class Name property, surrounded by [ ].

text

The window title.

top

The distance between the internal top edge of an object and the top edge of its container.

Topmost

Indicates whether the object should be placed above all non-topmost windows and should stay above them, even when the object is deactivated.

vbname

The object's name as set by the developer.

vbname path

The full hierarchy of vbname with all parent objects.

visible

Indicates whether the object is visible.

Possible values:                     
    True
    False

visual relations

Represents the test object's visual relations identifier.

Use this property in GetTOProperty and SetTOProperty steps to return or apply a VisualRelationsCollection object for a test object. The VisualRelationsCollection object enables you to retrieve or replace the visual relation identifier settings of a test object during a run session.

Syntax:

SetVRIColl = TestObject.GetTOProperty("visual relations")

TestObject.SetTOProperty "visual relations", VRIColl

For details, see VisualRelationsCollection Object in the Utility section of the Micro Focus UFT One Object Model Reference for GUI Testing.

This property is not listed in the Object Spy. It is not retrieved when you use the GetTOProperties method. It cannot be used in the Object Identification dialog box, the description area of the object repository, checkpoint or output value steps, and so on.

VScrollPageSize

The vertical page size. The scroll bar uses this value to determine the approximate size of the scroll box. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

VScrollPosition

The position of the vertical scroll box. If the object does not have a scroll bar, the GetROProperty method returns an empty value for this property.

WhatsThisButton

Indicates whether the "What's This" button is displayed in the title bar.

Possible values:                     
    True
    False (Default)

WhatsThisHelp

Indicates whether context-sensitive Help uses the "What's This" popup (provided by Help in 32-bit Windows operating systems) or the main Help window.

Possible values:

True: The application uses the "What's This" popup window.

False: The application uses the main Help window.

width

The object's width (in pixels).

window id

The object's window identifier.

WindowExtendedStyle

The extended window style of the object.

WindowState

Indicates the visual state of the form window at run-time.

Possible values:

0 (vbNormal): Normal.

1 (vbMinimized): Minimized (minimized to an icon).

2 (vbMaximized): Maximized (enlarged to maximum size).

WindowStyle

The window style of the object.

x

The object's x-coordinate (left) relative to the parent window (in pixels).

y

The object's y-coordinate (top) relative to the parent window (in pixels).

See also: