Click here to Skip to main content
Click here to Skip to main content

Property list ActiveX control

, 4 Nov 2004
Rate this:
Please Sign up or sign in to vote.
Property list similar to VB.NET, implemented as ActiveX control.

Sample Image - propList.gif


The article is updated! See below for the changes!


This property list control is similar to other property lists available, with two main differences:

  1. It's very easy to implement.
  2. 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.


  • BorderStyle As BorderStyle

    The border style of the control.

    BorderStyle enum:

    • BorderNone = 0 - No border
    • BorderRaized = 1 - EDGE_RAISED
    • BorderSunken = 2 - EDGE_SUNKEN
    • BorderStatic = 4 - BDR_SUNKENINNER
  • Precision As Short

    Overall precision of double values (* not used at the moment).

  • Clear()

    Clears all the properties from control.

  • AddProperty(BSTR Category, BSTR Caption, VARIANT Value, BSTR Description, buttonType ButtonType,VARIANT_BOOL IsEnabled)

    Adds new property to the control.

    • 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.
  • SetValue(BSTR PropertyName, VARIANT Value)

    Sets a value for single property.

    • PropertyName - the name of the property to set the value for.
    • Value - the value to set.
  • PropertyChanged(BSTR PropertyName, VARIANT NewValue)

    Fired on property change.

    • PropertyName - the name of the property that changed.
    • NewValue - the new value.
  • ButtonClicked(BSTR PropertyName, short ButtonType, VARIANT* Value)

    Fired on button click allowing you to perform some custom action for the button, and set the value to a new one as the result of performed actions.

    • 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...


Update - 04/11/2004

New Properties
  • ShowDescription As Boolean

    Controls display of the description (True/False).

New Methods
  • CloseAll()

    Closes all the categories (useful if you'd like to start the list when all the categories are closed. You can fill the list then call CloseAll() to close the categories).

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).


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Alex Hazanov
Software Developer (Senior) RDV Systems
Israel Israel
No Biography provided

Comments and Discussions

GeneralMy vote of 5 Pinmemberduke.liu8-Sep-11 0:15 
GeneralMy vote of 5 Pinmembermychina14-Mar-11 20:09 
GeneralDear sir,I have a question. Pinmemberking5524047019-Feb-11 23:44 
GeneralRe: Dear sir,I have a question. Pinmemberking5524047020-Feb-11 1:07 
GeneralRe: Dear sir,I have a question. PinmemberAlex Hazanov20-Feb-11 2:15 
GeneralMy vote of 5 Pinmember123456anurag27-Oct-10 21:53 
Generalusing the arrow keys to move thru list PinmemberSteve P13-Jun-08 14:01 
GeneralUsing SetValue for combobox Pinmemberdynal12-Jul-07 6:06 
GeneralRe: Using SetValue for combobox Pinmembercamalia7-Aug-07 15:18 
You must rebuild the activex PropList object after making some changes.
1. open class CComboItem in activex object`s project
2. replace body of SetValue(..) with
if (CListItem::SetValue(Value) == FALSE)
return FALSE;
if (IsWindow(m_hWnd))
return TRUE;
Good luck!
GeneralReally nice, some bugs/problems PinmemberPartyPaul19-Apr-07 4:47 
GeneralRe: Really nice, some bugs/problems PinmemberPartyPaul19-Apr-07 5:41 
GeneralGreat, but .... PinmemberBui Tan Duoc6-Feb-07 15:49 
QuestionHow to add new column Pinmemberjeando200317-Oct-06 16:04 
Questionhow to set value to Property whose type is ComboBox PinmemberDnyaneshwar Kotwal10-Aug-06 20:16 
AnswerRe: how to set value to Property whose type is ComboBox PinmemberAlex Hazanov18-Aug-06 12:10 
QuestionHow can I set value of SAFEARRAY type PinmemberNabam12-Jul-06 0:27 
GeneralActiveX contol properties PinmemberAlton Williams10-May-06 5:44 
GeneralRe: ActiveX contol properties PinmemberAlex Hazanov22-May-06 3:02 
GeneralMy question answered: PinmemberAlton Williams30-May-06 5:33 
Generalbug : coud not redraw window valid Pinmembersillyemperor22-Jan-06 20:20 
QuestionJavascript combobox problems PinmemberCoMiKe14-Dec-05 3:51 
AnswerRe: Javascript combobox problems PinmemberAlex Hazanov14-Dec-05 5:57 
GeneralRe: Javascript combobox problems PinmemberCoMiKe14-Dec-05 14:16 
GeneralRe: Javascript combobox problems PinmemberCoMiKe15-Dec-05 2:54 
GeneralWell Done Pinmembervalladis16-Aug-05 4:14 
GeneralNice work Pinmembertbw6-Jul-05 4:21 
GeneralFile Open Filter PinmemberJohnNJC8-Jun-05 3:29 
GeneralRe: File Open Filter PinmemberAlex Hazanov8-Jun-05 10:43 
GeneralBug report Pinmemberalex_br13-Feb-05 0:08 
Generalproperty icon PinmemberNoJunk4Me15-Dec-04 4:32 
GeneralRe: property icon PinmemberAlex Hazanov15-Dec-04 9:48 
GeneralSpanish Support PinmemberMicroElias Corporation Framework6-Dec-04 7:28 
GeneralRe: Spanish Support PinmemberAlex Hazanov8-Dec-04 7:46 
GeneralRe: Spanish Support PinmemberLefteris2313-Dec-06 5:28 
QuestionLisence? PinmemberXGears20005-Dec-04 22:36 
AnswerRe: Lisence? PinmemberAlex Hazanov5-Dec-04 23:16 
GeneralGet PinmemberTactor5-Nov-04 4:10 
GeneralRe: Get PinmemberAlex Hazanov5-Nov-04 10:29 
GeneralRe: Get PinmemberTactor5-Nov-04 10:51 
QuestionRe: Get PinmembertroyLiu23-May-06 23:56 
AnswerRe: Get PinmembertroyLiu24-May-06 1:21 
AnswerRe: Get PinmemberAlex Hazanov30-May-06 7:18 
QuestionRe: Get PinmembertroyLiu25-May-06 4:46 
GeneralUPDATED! PinmemberAlex Hazanov4-Nov-04 23:38 
GeneralOther Cuestion (VB) PinmemberMicroElias Corporation Framework26-Oct-04 6:13 
GeneralRe: Other Cuestion (VB) PinmemberAlex Hazanov26-Oct-04 10:19 
GeneralRe: Other Cuestion (VB) PinmemberMicroElias Corporation Framework28-Oct-04 11:29 
GeneralRe: Other Cuestion (VB) PinmemberAlex Hazanov29-Oct-04 13:20 
GeneralRe: Other Cuestion (VB) PinmemberAlex Hazanov29-Oct-04 13:24 
GeneralRe: Other Cuestion (VB) PinmemberMicroElias Corporation Framework8-Nov-04 4:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150327.1 | Last Updated 5 Nov 2004
Article Copyright 2004 by Alex Hazanov
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid