Click here to Skip to main content
12,298,927 members (51,342 online)
Click here to Skip to main content
Add your own
alternative version


53 bookmarked

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

You may also be interested in...

Comments and Discussions

GeneralRe: Really nice, some bugs/problems Pin
PartyPaul19-Apr-07 4:41
memberPartyPaul19-Apr-07 4:41 
GeneralGreat, but .... Pin
Bui Tan Duoc6-Feb-07 14:49
memberBui Tan Duoc6-Feb-07 14:49 
QuestionHow to add new column Pin
jeando200317-Oct-06 15:04
memberjeando200317-Oct-06 15:04 
Questionhow to set value to Property whose type is ComboBox Pin
Dnyaneshwar Kotwal10-Aug-06 19:16
memberDnyaneshwar Kotwal10-Aug-06 19:16 
AnswerRe: how to set value to Property whose type is ComboBox Pin
Alex Hazanov18-Aug-06 11:10
memberAlex Hazanov18-Aug-06 11:10 
QuestionHow can I set value of SAFEARRAY type Pin
Nabam11-Jul-06 23:27
memberNabam11-Jul-06 23:27 
GeneralActiveX contol properties Pin
Alton Williams10-May-06 4:44
memberAlton Williams10-May-06 4:44 
GeneralRe: ActiveX contol properties Pin
Alex Hazanov22-May-06 2:02
memberAlex Hazanov22-May-06 2:02 
GeneralMy question answered: Pin
Alton Williams30-May-06 4:33
memberAlton Williams30-May-06 4:33 
Generalbug : coud not redraw window valid Pin
sillyemperor22-Jan-06 19:20
membersillyemperor22-Jan-06 19:20 
QuestionJavascript combobox problems Pin
CoMiKe14-Dec-05 2:51
memberCoMiKe14-Dec-05 2:51 
AnswerRe: Javascript combobox problems Pin
Alex Hazanov14-Dec-05 4:57
memberAlex Hazanov14-Dec-05 4:57 
GeneralRe: Javascript combobox problems Pin
CoMiKe14-Dec-05 13:16
memberCoMiKe14-Dec-05 13:16 
GeneralRe: Javascript combobox problems Pin
CoMiKe15-Dec-05 1:54
memberCoMiKe15-Dec-05 1:54 
GeneralWell Done Pin
valladis16-Aug-05 3:14
membervalladis16-Aug-05 3:14 
GeneralNice work Pin
tbw6-Jul-05 3:21
membertbw6-Jul-05 3:21 
GeneralFile Open Filter Pin
JohnNJC8-Jun-05 2:29
memberJohnNJC8-Jun-05 2:29 
GeneralRe: File Open Filter Pin
Alex Hazanov8-Jun-05 9:43
memberAlex Hazanov8-Jun-05 9:43 
GeneralBug report Pin
alex_br12-Feb-05 23:08
memberalex_br12-Feb-05 23:08 
Generalproperty icon Pin
NoJunk4Me15-Dec-04 3:32
memberNoJunk4Me15-Dec-04 3:32 
GeneralRe: property icon Pin
Alex Hazanov15-Dec-04 8:48
memberAlex Hazanov15-Dec-04 8:48 
GeneralSpanish Support Pin
MicroElias Corporation Framework6-Dec-04 6:28
memberMicroElias Corporation Framework6-Dec-04 6:28 
GeneralRe: Spanish Support Pin
Alex Hazanov8-Dec-04 6:46
memberAlex Hazanov8-Dec-04 6:46 
GeneralRe: Spanish Support Pin
Lefteris2313-Dec-06 4:28
memberLefteris2313-Dec-06 4:28 
QuestionLisence? Pin
XGears20005-Dec-04 21:36
memberXGears20005-Dec-04 21:36 
AnswerRe: Lisence? Pin
Alex Hazanov5-Dec-04 22:16
memberAlex Hazanov5-Dec-04 22:16 
GeneralGet Pin
Tactor5-Nov-04 3:10
memberTactor5-Nov-04 3:10 
GeneralRe: Get Pin
Alex Hazanov5-Nov-04 9:29
memberAlex Hazanov5-Nov-04 9:29 
GeneralRe: Get Pin
Tactor5-Nov-04 9:51
memberTactor5-Nov-04 9:51 
QuestionRe: Get Pin
troyLiu23-May-06 22:56
membertroyLiu23-May-06 22:56 
AnswerRe: Get Pin
troyLiu24-May-06 0:21
membertroyLiu24-May-06 0:21 
AnswerRe: Get Pin
Alex Hazanov30-May-06 6:18
memberAlex Hazanov30-May-06 6:18 
QuestionRe: Get Pin
troyLiu25-May-06 3:46
membertroyLiu25-May-06 3:46 
GeneralUPDATED! Pin
Alex Hazanov4-Nov-04 22:38
memberAlex Hazanov4-Nov-04 22:38 
GeneralOther Cuestion (VB) Pin
MicroElias Corporation Framework26-Oct-04 5:13
memberMicroElias Corporation Framework26-Oct-04 5:13 
GeneralRe: Other Cuestion (VB) Pin
Alex Hazanov26-Oct-04 9:19
memberAlex Hazanov26-Oct-04 9:19 
GeneralRe: Other Cuestion (VB) Pin
MicroElias Corporation Framework28-Oct-04 10:29
memberMicroElias Corporation Framework28-Oct-04 10:29 
GeneralRe: Other Cuestion (VB) Pin
Alex Hazanov29-Oct-04 12:20
memberAlex Hazanov29-Oct-04 12:20 
GeneralRe: Other Cuestion (VB) Pin
Alex Hazanov29-Oct-04 12:24
memberAlex Hazanov29-Oct-04 12:24 
GeneralRe: Other Cuestion (VB) Pin
MicroElias Corporation Framework8-Nov-04 3:45
memberMicroElias Corporation Framework8-Nov-04 3:45 
GeneralObject Lock Pin
MicroElias Corporation Framework26-Oct-04 4:15
memberMicroElias Corporation Framework26-Oct-04 4:15 
GeneralRe: Object Lock Pin
Anonymous26-Oct-04 9:13
sussAnonymous26-Oct-04 9:13 
GeneralRe: Object Lock Pin
Alex Hazanov26-Oct-04 9:15
memberAlex Hazanov26-Oct-04 9:15 
GeneralProblems with C# Pin
SebDau8-Aug-04 23:41
memberSebDau8-Aug-04 23:41 
GeneralRe: Problems with C# Pin
Alex Hazanov9-Aug-04 1:05
memberAlex Hazanov9-Aug-04 1:05 
GeneralUsing with VisualC++ Pin
kdvyas27-Jun-04 20:09
memberkdvyas27-Jun-04 20:09 
GeneralRe: Using with VisualC++ Pin
Alex Hazanov27-Jun-04 20:42
memberAlex Hazanov27-Jun-04 20:42 
GeneralRe: Using with VisualC++ Pin
kdvyas27-Jun-04 23:03
memberkdvyas27-Jun-04 23:03 
GeneralRe: Using with VisualC++ Pin
Alex Hazanov28-Jun-04 4:53
memberAlex Hazanov28-Jun-04 4:53 
Generalproblem in using Pin
bensabat9-Jun-04 20:22
memberbensabat9-Jun-04 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web01 | 2.8.160525.2 | Last Updated 5 Nov 2004
Article Copyright 2004 by Alex Hazanov
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid