Programming with Reflection

image\rwnprg32.gif CharacterAttributes method


Syntax ThisAttribute = object.CharacterAttributes(Row, Column)



Returns the character attributes of the character at the specified row and column.


Row Argument Type: Integer
Specifies a row in display memory.

 For HP emulation, the first row of display memory is 0, rows are numbered with positive numbers only, and the first row on the screen can be anything. To find coordinates relative to the current screen, use the ScreenTopRow property for the value of the top row on the screen. In HP emulation, DisplayMemoryTopRow will always return 0.

 For UNIX and OpenVMS emulation, the first screen row is always 0; rows on the screen have positive numbers, and rows scrolled off the screen have negative numbers. In UNIX and OpenVMS emulation, ScreenTopRow will always return 0.

 The DisplayRows property returns the number of rows displayed on the screen. To check all rows on the current screen in either emulation, use the following row values:

Dim minRow, maxRow as Integer

minRow = .ScreenTopRow

maxRow = .ScreenTopRow + .DisplayRows - 1

Column Argument Type: Integer
Specifies a column in display memory. Columns are numbered starting at 0 in all emulations.

 The DisplayColumns property returns the number of columns displayed on the screen. To check all columns on the current screen, use the following column values:

Dim minColumn, maxColumn as Integer

minColumn = 0

maxColumn = .DisplayColumns - 1


ThisAttribute Return type: Enumeration
This method returns an integer value. The return value of rcNoCharacter (-1) means that there is no character in the specified row and column, and also that there are no more characters to the right of that column in that row. If there is a character at the specified location, the return value is between 0 and 15, and is equal to one of the positive constants listed here, or the sum of one or more of these constants. For example, if a character has a blinking attribute, the return value will be rcBlinkAttribute (1). If the character is blinking, inverse, and underlined, the return value will be rcBlinkAttribute+rcInverseAttribute+rcUnderlineAttribute (1+2+4= 7)

Return constants Equivalent value

rcNoCharacter -1

rcPlainAttribute 0

rcBlinkAttribute 1

rcInverseAttribute 2

rcUnderlineAttribute 4

rcBoldAttribute 8 (UNIX and OpenVMS only)

rcHalfbrightAttribute 8 (HP only)


image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command