The current window whose subclassed controls are being manipulated.
Usage
Set_Property(OLECtrlEntID, "OLE.CurrentWindow", Text)
Values
Text can contain anything. For example: @Window or "MY_FORM"
Default: ""
Remarks
The CurrentWindow property is provided for convenience. If you plan to manipulate multiple controls on the same form, or the same control many times over, then you can save some time by setting this property to the name of the form. Then, all you have to do is pass the control name (minus the form name) in the property indexes.
This property only really works if you use the full control entity names when subclassing your controls.
Here are the steps, in order, the OLE Subclass control goes through to find the respective subclassed control. Once an index successfully maps to a control, the remaining steps are skipped:
Steps |
---|
1. The index is tried as is |
2. Otherwise, the index has its semicolons swapped with periods and is tried again |
3. Otherwise, the index is prefixed by CurrentWindow and a period and is tried again |
Example
// Adding an option in one line Set_Property(@Window:".OLE_SUBCLASS", "OLE.OptionButton[MY_FORM;MY_EDITLINE]", 1) // Adding an option using CurrentWindow Set_Property(@Window:".OLE_SUBCLASS", "OLE.CurrentWindow", "MY_FORM") Set_Property(@Window:".OLE_SUBCLASS", "OLE.OptionButton[MY_EDITLINE]", 1)