Important
The article is updated! See below for the changes!
Introduction
This property list control is similar to other property lists available, with two main differences:
- It's very easy to implement.
- It's implemented as an ActiveX control, so it's suitable for C++, C#, and VB as one. Also, it can be placed on an HTML page or any other container that supports ActiveX and script.
Reference
Properties
BorderNone
= 0 - No border
BorderRaized
= 1 - EDGE_RAISED
BorderSunken
= 2 - EDGE_SUNKEN
BorderFlat
= 3 - BDR_RAISEDOUTER|BDR_RAISEDINNER
, BF_FLAT
BorderStatic
= 4 - BDR_SUNKENINNER
Methods
Category
- the category of the property.
Caption
- the caption (the string name of the property).
Value
- the property value (String
, Short
, Long
, String
array, DateTime
, Picture
etc...).
Description
- the text to display in the description window.
ButtonType
- the button type of the property (* applicable to edit controls, and DateTime
control).
IsEnabled
- is the property enabled.
ButtonType enum
:
ButtonNone
= 0 - no button
ButtonElipsis
= 1 - ellipsis button (three dots), edit control created.
ButtonPick
= 2 - pick button (arrow with x), edit control created.
ButtonOpen
= 3 - button opens a file open dialog, edit control created.
ButtonLink
= 4 - button opens the Explorer, edit control created.
ButtonColor
= 5 - button opens pick color dialog, color control created.
ButtonMail
= 6 - button opens new mail message, edit control created.
ButtonLongDate
= 7 - displays a date in long format, DateTime
control created.
ButtonShortDate
= 8 - displays a date in short format, DateTime
control created.
ButtonTime
= 9 - displays a time, DateTime
control created.
PropertyName
- the name of the property to set the value for.
Value
- the value to set.
Events
PropertyName
- the name of the property that changed.
NewValue
- the new value.
PropertyName
- the name of the property whose button was clicked.
ButtonType
- the type of the button.
Value
- passed ByRef
(as pointer) allowing you to set a new value on function return.
* Note that some of the controls have a default action for button click, as the color button, linkbutton, mail button etc...
History
Update - 04/11/2004
New Properties
New Methods
New button types
ButtonMultyText
= 10
- Creates a text window five rows high for multiple lines text.
ButtonButton
= 11
- Creates a button which occupies the entire row.
ButtonFunction
= 12
- Creates a property whose value is calculated from the provided function which may be based on other properties. For example:
You have a property named Diameter
and its value is 10. You add a function type property named area
, click on its button, the "Enter function" dialog appears where you write - 3.14 * ([Diameter]/2)^2. After you close the dialog, the value displayed in the property would be: 78.5. If you now change the Diameter
to 4, the Area
property will automatically update to 12.56.
ButtonPicture
= -1
- The passed string is a path to an image file (you can also pass images as IDispatch
interface).