2 The control Object

The tasks of the control object depend on the way the control object is used. There are two possibilities:

  • If the control object is used as OLE client, then the communication with the server will be established with this object. In addition, this object defines the area in which the server is to appear within the client. All calls made to the server to set and query properties or to call methods will thus be carried out via this control object.
  • If the control object is used as OLE server, it is used to define the interface and to communicate with the client. Dialog Manager is not able to make all its objects, methods, resources and attributes, etc. available as interfaces. This would go beyond the scope of the interfaces in OLE and, in addition, it is not recommendable offering the entire dialog to the external program. The attributes, methods and events of the control object describe the interface of the OLE server to its clients.

Definition

{ export | reexport } { model } control { <Identifier> }
{
  <standard attributes>
  <plain attributes>
  <geometry attributes>
  <grid attributes>
  <hierarchy attributes>
  <layout attributes>
  <object-specific attributes>
}

Events

extevent

finish

help

help

paste

select

start

Children

canvas

checkbox

edittext

groupbox

image

listbox

menubox

menuitem

menusep

notebook

poptext

pushbutton

radiobutton

rectangle

scrollbar

spinbox

statictext

tablefield

treeview

window

Parent

dialog

groupbox

layoutbox

module

notepage

splitbox

toolbar

window

Menu

Pop-up menu

2.1 Attributes

Attributes

RSD

PID

Properties

Short Description

.acc_label

string

object

string

text

S.G/D/C

overwrites the Automation Identifier for Microsoft UI Automation

.acc_text

object

string

text

string

S.G/D/C

overwrites the Automation Name for Microsoft UI Automation

.accelerator

identifier

accel

S,G/D/C

accelerator of object

.active

boolean

active

S,G/D/C

state of server or client

.bgc

identifier

color

S,G/D/C

background color of object

.bordercolor

identifier

color

S,G/D/C

border color of object

.borderwidth

integer

integer

S,G/D/C

width of object border

.child[integer]

object

object

S,G/-/C

accesses the I-th child object

.childcount

integer

integer

-,G/-/-

queries the number of child objects

.class

class

class

-,G/-/-

class of object

.connect

boolean

boolean

S,G/D/C

state of connection to OLE server or OLE client

.cursor

identifier

cursor

S,G/D/C

cursor belonging to object

.cut_pending

boolean

boolean

S,G/-/-

cut operation is still pending

.cut_pending_changed

boolean

boolean

-,G/-/-

changing state during cut operation

.dialog

identifier

instance

-,G/-/-

dialog for object

.document[integer]

object

document

S,G/-/-

accesses the I-th XML Document

.external

boolean

boolean

-,G/-/-

returns if the object class is an USW class

.external[integer]

class

class

-,G/-/-

returns the I-th registered USW class

.fgc

identifier

color

S,G/D/C

foreground color of object

.firstchild

object

object

S,G/-/C

accesses the first child object

.firstrecord

object

record

S,G/-/C

accesses the first record of an object

.firstsubcontrol

object

object

S,G/D/C

accesses the first subcontrol

.focus

object

boolean

instance

boolean

-,G/-/-

keyboard focus of object

.font

identifier

font

S,G/D/C

font of object

.function

identifier

func

S,G/D/C

function of object

.groupbox

identifier

instance

-,G/-/-

groupbox the object belongs to

.height

integer

integer

S,G/D/C

indicates height of object

.help

string

identifier

string

text

S,G/D/C

helptext of object

.index

integer

integer

-,G/-/-

current index of object in the children list of its parent

.label

string

string

S,G/D/C

name (identifier) of object

.lastchild

object

object

S,G/-/C

accesses the last child object

.lastrecord

object

record

S,G/-/C

accesses the last record of an object

.lastsubcontrol

object

object

S,G/D/C

accesses the last subcontrol

.license_key

string

string

S,G/D/C

license key for an ActiveX control

.member[integer]

attribute

attribute

-,G/-/-

i-th user-defined attribute of object

.membercount

integer

integer

-,G/-/-

number of user-defined attributes

.menu

identifier

instance

S,G/D/C

menu of object

.message[integer]

identifier

message

-,G/D/-

messages to be sent to client

.mode

enum

enum

S,G/D/C

mode of control object, either as client or as server

.model

identifier

instance

S,G/D/C

model belonging to object

.name

string

string

-,G/D/-

name or ProgID of server or of client

.notepage

identifier

instance

-,G/-/-

notepage the object belongs to

.parent

identifier

instance

S,G/-/-

parent of object

.picture

identifier

instance

S,G/D/C

picture to be displayed in inactive state

.posraster

boolean

boolean

S,G/D/C

indication of position refers to raster

.real_height

integer

integer

-,G/-/-

real height of object

.real_sensitive

boolean

boolean

-,G/-/-

real selectability of object

.real_visible

boolean

boolean

-,G/-/-

real visibility of object

.real_width

integer

integer

-,G/-/-

real width of object

.real_x

integer

integer

-,G/-/-

real distance from the left (in pixel)

.real_xraster

integer

integer

-,G/-/-

width of internally used raster

.real_y

integer

integer

-,G/-/-

real distance from top (in pixel)

.real_yraster

integer

integer

-,G/-/-

height of internally used raster

.record[integer]

object

record

S,G/-/C

accesses the I-th record of an object

.recordcount

integer

integer

-,G/-/-

queries the number of child records

.reffont

identifier

font

S,G/D/C

reference font of object

.scope

integer
(1, 2, 3)

scope

-,G/-/-

queries the object type (Default, Model or instance)

.sensitive

boolean

boolean

S,G/D/C

selectability of object

.sizeraster

boolean

boolean

S,G/D/C

size refers to raster of parent object

.statushelp

string

identifier

string

text

S,G/D/C

text to be displayed in the statusbar

.subcontrol[integer]

object

object

S,G/D/C

accesses the I-th subcontrol

.subcontrolcount

integer

integer

-,G/-/-

queries the number of subcontrols

.toolhelp

string

object

string

text

S,G/D/C

gives a short explanation of object at the cursor

.userdata

anyvalue

anyvalue

S,G/D/C

userdata of object of any datatype

.uuid

string

string

-,G/D/-

unambiguous UUID of OLE server

.visible

boolean

boolean

S,G/D/C

visibility of object

.width

integer

integer

S,G/D/C

current width of object

.window

identifier

instance

-,G/-/-

window the object belongs to

.xauto

integer

(-1, 0, 1)

integer

S,G/D/C

type of x-coordinates definition

.xleft

integer

integer

S,G/D/C

x-coordinate, distance from the left

.xraster

integer

integer

S,G/D/C

unit in x direction

.xright

integer

integer

S,G/D/C

x-coordinate, distance from the right

.yauto

integer

(-1, 0, 1)

integer

S,G/D/C

type of y-coordinates definition

.ybottom

integer

integer

S,G/D/C

y-coordinate, distance from bottom

.yraster

integer

integer

S,G/D/C

unit in y direction

.ytop

integer

integer

S,G/D/C

y-coordinate, distance from top

2.2 Specific Attributes

2.2.1 connect

Identifier:

.connect

Classification:

object-specific attribute

Definition

argument type:

boolean

C definition:

AT_connect

C datatype:

DT_boolean

COBOL definition:

AT-connect

COBOL datatype:

DT-boolean

access:

set, get

changed, i.e. attribute can be used to trigger rules.

This attribute defines the state of the connection to the OLE client or to the OLE server. The services of the OLE server can only be used if there is a connection.

2.2.2 mode

Identifier:

.mode

Classification:

object-specific attribute

Definition

argument type:

enum

value range:

mode_none, mode_client, mode_server

C definition:

AT_mode

C datatype:

DT_enum

COBOL definition:

AT-mode

COBOL datatype:

DT-enum

access:

set, get

changed, i.e. attribute can be used to trigger rules.

This attribute defines how to use the control object. There are three possibilities:

2.2.3 name

Identifier:

.name

Classification:

object-specific attribute

Definition

argument type:

string

C definition:

AT_name

C datatype:

DT_string

COBOL definition:

AT-name

COBOL datatype:

DT-string

access:

set, get

changed, i.e. attribute can be used to trigger rules.

This attribute defines the name of the corresponding server at the control object which is used as OLE client. You may deposit either the name or the ProgID of the server in this attribute.

If the control object is used as OLE server, the given string in this attribute will be registered as server name in the registry list.

Example

model control CtTest

{

  .mode mode_client;

  .name "InternetExplorer.Application.1";

  .visible true;

  .active true;

  .connect false;

}

2.2.4 picture

Identifier:

.picture

Classification:

object-specific attribute

Definition

argument type:

object

C definition:

AT_picture

C datatype:

DT_tile

COBOL definition:

AT-picture

COBOL datatype:

DT-tile

access:

set, get

changed, i.e. attribute can be used to trigger rules.

This attribute is used to define the picture which is to be displayed in the inactive state of the control object.

See Also

Attribute .picture

2.2.5 uuid

Identifier:

.uuid

Classification:

object-specific attribute

Definition

argument type:

string

C definition:

AT_uuid

C datatype:

DT_string

COBOL definition:

AT-uuid

COBOL datatype:

DT-string

access:

get

This attribute must be set when the control object is used as OLE server. Via this UUID the object can be clearly identified by other programs. This UUID will be generated by using the program guidgen.exe.

Figure 14-1: Generation of GUID

If the control object is used as OLE client, you may deposit the server UUID in this attribute. This attribute thus replaces the attribute .name which is usually used to deposit the server name.