Article | 60000655 |
Type | Wish |
Product | Engine |
Version | 6014 |
Date Added | 9/30/2008 12:00:00 AM |
Fixed | (1/29/2009 12:00:00 AM) |
Submitted by | Frank Louis |
Summary
Property Grid whishes : 1. Filter visibility of PropertyGrid Items 2.Change readonly of PropertyGrid Items 3.Event firing when change the focus from one gridItem into an other. 4.Event firing when a new object is selected in PropertyGrid control
Solution
The following events was added in version 6015
FilterVisibilityProperty
Raise before an item selected into the grid control.
/// <param name="ComponentTypeName">The name of the object Type that contain the property.</param>
/// <param name="PropertyName">The name of the property.</param>
/// <param name="isvisible">Currently used vivibility value.</param>
void FilterVisibilityProperty(string ComponentTypeName, string PropertyName, ref bool isvisible);
FilterReadOnlyProperty
Raise before an item selected into the grid control.
/// <param name="ComponentTypeName">The name of the object Type that contain the property.</param>
/// <param name="PropertyName">The name of the property.</param>
/// <param name="isreadonly">Currently used readonly value.</param>
void FilterReadOnlyProperty(string ComponentTypeName, string PropertyName, ref bool isreadonly);
SelectedGridItemChanged
Raise when a when change the focus from one gridItem into an other.
/// <param name="oldComponentTypeName">The name of the Object Type where the previous selected GridItem property belongs to.</param>
/// <param name="oldPropertyName">The name of the previous selected GridItem property.</param>
/// <param name="newComponentTypeName">The name of the Object Type where the currently selected GridItem property belongs to.</param>
/// <param name="newPropertyName">The name of the currently selected GridItem property.</param>
/// <param name="cancel">A boolean reference value that represents if the currently selected item can get the focus.</param>
void SelectedGridItemChanged(string oldComponentTypeName, string oldPropertyName, string newComponentTypeName, string newPropertyName, ref bool cancel);
SelectedObjectChange
Raise when a new object is selected in PropertyGrid control
/// <param name="newObject">New object which is going to be selected in the PropertyGrid control.</param>
/// <param name="cancel">A boolean reference value that represents if the currently selected item can be changed to the newObject.</param>
void SelectedObjectChange(object newObject, ref bool cancel);
All of these events are implemented for vdPropertyGrid control in vdPropertyGrid.dll, VdProControl control in VdProControl.dll, vdraw.ocx and vdrid.ocx wrapper components.
In order to enable the usuge of previous events the FreezeGridEvents property of vdDocument must be set to False:
Example in VB6 using the vdraw.ocx wrapper with VectorDraw.Professional.tlb import
Dim doc As VectorDraw_Professional.vdDocument
Set doc = VDraw1.ActiveDocument.WrapperObject
doc.FreezeGridEvents = False