The VBAttribute statement specifies interface information for
an attribute. This information includes the attribute name,
attribute description, attribute type (class name), get member
function declaration, set member function declaration, and
attribute notification ID. To describe the implementation as well
as the interface of a promoted attribute, use the
VBPromotedAttribute statement.
an Attribute with no get member function and no set member
function can be used as a settings attribute for a constructor
parameter. The setting feature flag must be specified
for a settings attribute.
For a part that inherits a style attribute but has no
style flag on its constructor, specify the nosetting and
noconnect feature flags. You must also specify the
constructor with a VBConstructor statement.
{ //VBAttribute: name, description?,
type, getSignature?, setSignature?,
eventId?, featureFlag*, displayName?
}
-
- name
- Attribute name to be used in visual composition.
- description
- Optional feature description.
( "text
description" | (resourceId, resourceDll)
)
-
- resourceId
- Optional resource number of the descriptive text.
If you specify a resource ID, you must also
specify the resource DLL name.
- resourceDll
- Optional resource DLL name containing the
descriptive text. You must specify the DLL name
if you specify a resource ID. Do not include the
.dll extension.
- type
- Attribute data type. This must be compatible with the
type used for get and set member functions.
- getSignature
- Optional signature of a C++ public member function that
returns the attribute value. The member function must
either have no parameters, or all parameters must have
values supplied. Parameters can be supplied with either
default values, such as int i=1, or hard-coded
values, such as =1.
- setSignature
- Optional signature of a C++ public member function that
changes the attribute value. The member function must
either have one parameter, or all parameters after the
first must have values supplied. Parameters can be
supplied with either default or hard-coded values.
- eventId
- Optional C++ public notification ID for visual and
nonvisual parts. If specified, the ID is sent on
attribute-to-attribute connections whenever the attribute
value changes.
- featureFlag
- Optional feature flag.
( connect |
noconnect | setting | nosetting
| preferred | noWin |
noOS2 | noAIX )
-
- connect
- Allows connections to the attribute. If neither connect
nor noconnect is specified, connect
is assumed.
- noconnect
- Prevents connections to the attribute.
- setting
- Allows the attribute to appear in the part
property sheet. If neither setting nor nosetting
is specified, setting is assumed if the
attribute has a set member function.
- nosetting
- Prevents the attribute from appearing in the part
property sheet.
- preferred
- Specifies that the feature is preferred for the
part. Preferred features appear in the part
connection list.
- noWin
- Excludes the feature on Windows.
- noOS2
- Excludes the feature on OS/2.
- noAIX
- Excludes the feature on AIX.
- displayName
- Optional display name for the attribute. The
display name is used instead of the attribute
name in the part property sheet.
(
"descriptive name" | (resourceId,
resourceDll) )
-
- resourceId
- Optional resource number of the
descriptive name. If you specify a
resource ID, you must also specify the
resource DLL name.
- resourceDll
- Optional resource DLL name containing the
descriptive name. You must specify the
DLL name if you specify a resource ID. Do
not include the .dll extension.
Defining the Part
Interface Using Part Information Statements
Visual Part Information
Statements
Nonvisual Part Information
Statements
Class Interface Part
Information Statements
Part Information Statement
Descriptions
Part Information
Statement Examples