Advanced PowerBuilder

HomePrevious Lesson: Link Update
Next Lesson: Opening a File In a OLE Control

OLE Control Attributes

The following table lists all important OLE Control attributes:

Attribute Name

Data type

Description

Allowed Values

DocFileName

String

The name of the OLE storage file or a data file of the server application that has been opened for the control. Using either InsertFile(), Open() (opening the file, i.e., using the first format) doesn't populate this attribute. This attribute would be populated only when you open the object from the sub-storage of the storage file. Ex: ole_control.Open( StorageVariableName, "SubStorageName")

 

ClassLongName

String

The long name for the server associated with the OLE control. Ex: "Microsoft Word Document". Either Open() format 1, or InsertFile() doesn't populate this attribute. This is populated when you use Open() other formats, InsertClass() and InsertObject().

 

ClassShortName

String

The short name for the server associated with the OLE control. Ex: "Document". Other behaviour is similar to "ClassLongName".

 

LinkItem

String

The file name that is linked with the OLE control.

 

ObjectData

BLOB

This attribute is populated when the object is embedded. The object it self is stored as BLOB in this attribute. This attribute is useful when you want to read from the database and load the OLE control and/or to update the database column.

 

Activation

OmActivation

Specifies the type of OLE Object activation.

ActivateOnDoubleClick!, ActivateOnGetFocus!, ActivateManually!

DisplayType

OmDisplayType

Specifies whether to display the OLE Object as an icon or the content of the OLE Object.

DisplayAsIcon!, DisplayAsContent!

ContentsAllowed

OmContentsAllowed

Speicifies whether the OLE Object can embedded in the OLE control or linked.

ContainsAny!, ContainsEmbeddedOnly!, ContainsLinkedOnly!

LinkUpdatreOptions

OmLinkUpdateOptions

Specifies whether the OLE Server automatically updates the linked object or you update programatically.

LinkUpdateAutomatically!, LinkUpdatemanually!

IsDragTarget

Boolean

Specifies whether another OLE Control can be dropped on this control or not. Don't confuse with other Drag and Drop attributes that are available for other controls.

 

Object

OmObject

Stores the link information.

 

HomePrevious Lesson: Link Update
Next Lesson: Opening a File In a OLE Control