OBJ( ) |
Return Object Information |
1. |
OBJ(ctl_id [ ,ERR=stmtref ] ) | |
2. |
OBJ(LIST) (added in PxPlus v9.00) |
Where:
ctl_id |
Control ID number that is assigned to each control when created. Numeric expression. If 0 (zero), information about the current window is returned. |
stmtref |
Program line number or statement label to which to transfer control. |
Return Control Information
OBJ(ctl_id [ ,ERR=stmtref ] )
This format returns a string containing information about a given custom control object (i.e. button, list_box, etc.). If the control does not exist, the system returns an Error #65: Window element does not exist or already exists.
Example:
This example shows what is returned for an existing list_box 10. The string returned by the OBJ( ) function contains 64 characters:
list_box 10,@(10,10,60,10),fmt="L8 B2 L20 C10 N15 C3"
?hta(obj(10))
00040000000A000A003C000A0000000000000978004E00CE01E40092004F009501E2009000000000
000000000000000000000000000000000000000000000000
Characters |
Information Returned by OBJ( ) | ||||||||||||||||||||||||||||||||
1,2 |
These bytes indicate the type of control:
| ||||||||||||||||||||||||||||||||
3,2 |
These bytes indicate the current status of the control. The value in the two bytes is an accumulation of bits indicating the various states:
Example: To detect enabled/disabled NOMADS control: X$=obj(OBJECT_NAME.CTL) | ||||||||||||||||||||||||||||||||
5,2 |
Column | ||||||||||||||||||||||||||||||||
7,2 |
Line | ||||||||||||||||||||||||||||||||
9,2 |
Width | ||||||||||||||||||||||||||||||||
11,2 |
Height | ||||||||||||||||||||||||||||||||
13,4 |
Visual screen attributes at time of creation | ||||||||||||||||||||||||||||||||
17,4 |
Operating system handle | ||||||||||||||||||||||||||||||||
21,2 |
Left Pixel }…Includes Border | ||||||||||||||||||||||||||||||||
23,2 |
Top Pixel }…Includes Border | ||||||||||||||||||||||||||||||||
25,2 |
Right Pixel }…Includes Border | ||||||||||||||||||||||||||||||||
27,2 |
Bottom Pixel }…Includes Border | ||||||||||||||||||||||||||||||||
29,2 |
Left Viewable Column | ||||||||||||||||||||||||||||||||
31,2 |
Top Viewable Row | ||||||||||||||||||||||||||||||||
33,2 |
Viewable number of Columns | ||||||||||||||||||||||||||||||||
35,2 |
Viewable number of Rows |
Return Object List
OBJ(LIST)
This format is used to return a string that describes all the objects defined within the system. For each object in the system, the function returns a string consisting of:
Each of these fields is delimited by a TAB ($09$) character, and each object's definition is terminated by the current separator character.
(The ability to get a list of objects was added in PxPlus v9.00, build 9200.)