The control's release notes can be found on our web site, looking for the Release Notes column in the control's main page. Click here for direct link.
The control provides the following ways to add new items to the control:
The control provides a Property property that helps you to find an property given its identifier or its name. The property's ID property defines the property's identifier. The following sample changes the foreground color for the property called "BackColor" :PropertiesList1.Property("BackColor").ForeColor = vbBlue
The ExpandItem property expands an item given the property's identifier or the property's name. For instance the ExpandItem(1234) = True expands the property that has the identifier 1234 ( Property.ID ), or ExpandItem("Group 2") = False collapses the property called Group 2.
The Property object provides the properties like: CellForeColor, CellBackColor that helps you to colorize the cells in the control. The control provides also a property called BackColorAlternate that provides alternate colors for odd/even items. If the BackColorAlternate is 0 the control doesn't use the BackColorAlternate property.
The ColumnAutoResize property is what you are looking for. If the control's ColumnAutoResize property is True, the control arranges all visible columns to fit the control's client area. In this case no horizontal scroll bar is displayed. If the ColumnAutoResize property if False, control displays a horizontal scroll bar if the width of visible columns doesn't fit the width of the client area. You can use HeaderVisible property to show the control's header bar.
Yes. You can find UNICODE versions here.
Changing the Name property of the Font object doesn't notify the control that the used font has been changed, so calling PropertiesList1.Font.Name = "Arial Unicode MS" has effect only for the control's drop-down window, but it doesn't change the font for control inside text editors. Remember that Font is a system object, and it is not implemented by the control, so that's the reason why the control is not notified that the user has changed the font's name. The following sample changes the font used by inside text editors as well for the drop-down window:Dim f As New StdFont f.Name = "Arial Unicode MS" PropertiesList1.Font = f
The control exposes an Interfaces property ( it is hidden and your VB context window will not display it ) that allows you to get the list of implemented interfaces. The following sample displays the list of interfaces implemented by a Form object:Debug.Print PropertiesList1.Interfaces(Me)
The following samples adds an Enum type property:Please notice that the Refresh method was called after adding values to the predefined list. The Refresh method is required because when the property is added the list of predefined values is unknown, since they've been added later.With PropertiesList1 With .Add("Enum", 1, EditEnum, "A property that uses a list of predefined values") .AddValue 1, "Item 1" .AddValue 2, "Item 2" .AddValue 3, "Item 3" End With .Refresh End With
When you adding that property using the Add method you have to use the EditPassword type.
The control's ReadOnly property is what you are looking for.
We really need the ability to validate data as it is being entered into an editable field. How can we handle it?
The control fires the EditChange event while user alters the text into an edit fields. The event passes in the Value argument the current text in the edit field. By changing that value you can handle situation like this.Private Sub PropertiesList1_EditChange(ByVal Property As EXPROPERTIESLISTLibCtl.IProperty, Value As Variant) Debug.Print Value End Sub
Yes. The following sample helps you to make your control looks like in the .NET environment:With PropertiesList1 .BeginUpdate .HasGridLines = True .HasLines = False ' Shows the categories .ShowCategories = True .MarkCategories = True .DefaultCategory = "Misc" .GridLineColor = &H80000003 .EndUpdate End With
I've got a message "Invalid property value" when user changes a value that wasn't accepted by the property. Is there any way to get ride of that message or to change it?
The control provides a property called InvalidValueMessage that helps you to change the caption for that error. If the property is empty no message box occurs.
I have a collection browsed by your control but I don't like how its elements are displayed? Is there anything to do regarding it?
The NameItemsCollection property provides a list of values that indicates the name of the properties that control looks for when it browses a collection. For instance, if you have a collection of objects of the Field type. When control loads the collection it interrogates each element for any property named in the NameItemsCollection. If the property is not found, the control displays the element's index instead. So make sure that one of the Field properties that you want to be displayed instead its index is listed in the NameItemsCollection property.
The control loads only the required data from the object's type library. For instance, when a property of Object type is expanded the control queries the object's type library and loads the object properties on the fly.
You have to check the control's AllowToolTip property. If the AllowTooltip property is False the control doesn't enable the tooltip feature. By default, the control's tooltip feature is disabled.
Yes. The Property object provides two new properties Mask and MaskChar that helps you to use masked edit in the control. You can use the Mask to enter any data that includes literals and requires a mask to filter characters during data input. The Mask property is composed by a combination of regular characters, literal escape characters, and masking characters. The Mask property can contain also alternative characters, or range rules. A literal escape character is preceded by a \ character, and it is used to display a character that is used in masking rules. Here's the list of all rules and masking characters:
Here's a snippet of VB code that helps you to delete the picture object when user presses the Delete key.Private Sub PropertiesList1_KeyPress(KeyAscii As Integer, Shift As Integer) On Error Resume Next If (KeyAscii = vbKeyDelete) Then With PropertiesList1 If Not (.SelectedProperty.Value Is Nothing) Then If TypeOf .SelectedProperty.Value Is IPictureDisp Then .SelectedProperty.Value = Nothing .Refresh End If End If End With End If End Sub
Yes, that's possible. You need to use the Add method and EditObject type like in the following sample:The "From" item will include all properties of the form object ( me ), and the PropertiesList item includes the properties of the PropertiesList1 object.With PropertiesList1 .BeginUpdate .Add "From", Me, EditObject .Add "PropertiesList", PropertiesList1, EditObject .EndUpdate End With
The SelectedProperty property of the control helps you to get the selected property as well as changing the selected property as follows:PropertiesList1.SelectedProperty = PropertiesList1.Property("Appearance")
Yes, the Exontrol ExPrint component ( exprint.dll ) provides Print and Print Preview capabilities for the exPropertiesLisy component. Once that you can have the exPrint component in your Components list, insert a new instance of "ExPrint 1.0 Control Library" to your form and add the following code:Private Sub Command1_Click() With Print1 Set .PrintExt = PropertiesList1.Object .Preview End With End Sub
The Exontrol ExPrint component ( exprint.dll ) provides Print and Print Preview capabilities for the Exontrol ExList component.
The ToolTip property of the Property object allows you to specify a custom tooltip to the property. The tooltip pops up if the AllowToolTip property is True, and the mouse pointer is over the property's name.
The NumericFloat property allows you to enter a property of float type. The format of the number could be like follows [+/-]digit[.]digit[e/E/d/D][+/-]digit, where digit is any combination of digit characters. If the NumericFloat property is True, the control filters the input characters that have no sense in the format of the number.
Use the AutoIndent property on False.
Use the Option property to customize a specified editor. The following sample customizes the EditDate editor to display strings in Romanian language:
I am calling the "PropertiesList1.Select Me", in VB, and the PropertiesList1 object is listed twice. What I am doing wrong?
Set the ShowItemsCollection property on False. The Me object exposes a collection of controls that displays in the form, and also it exports a property for each control in the collection, that's why the PropertiesList1 object is listed twice.
Do you have an example of how I would use your eXPropertiesList control to browse the properties of a Listbox ActiveX control?
The following sample shows you how you can browse the properties of the Microsoft's ListBox ActiveX control:Private Sub Form_Load() Set l = Controls.Add("Forms.ListBox.1", "list1") l.Visible = True PropertiesList1.Select l End Sub
I am browsing my object using the Select method. How can I serialize ( save and load ) the properties the user changes?
The Select method browses properties of the giving object, which means it loads the properties with their values in the eXPropertiesList control. The control's property is changed as soon as the user changes the Property in the eXPropertiesList control. The eXPropertiesList control fires the PropertyChanged event when the user changes a Property in the browser control. The following sample uses the browser's Template/TemplateDef properties to change the properties of your object at runtime. Also it uses the DisplayCaption property to retrieve the name of the property to be serialized in the Template format.