>Wondering if its possible to generically redirect property references from one object to another?
>
>What I would like to do is create a list of properties and then generically redirect these properties from one object to another object via This_Access, This_Assign methods and/or bindevents() vs. having to manually add specific property_ACCESS, property_ASSIGN methods for each property being redirected.
>
>Sample scenario: A container with a child label where I would like to redirect the parent container's fontname, fontsize, fontbold, etc properties (already added to container class) to the equivalently named properties of the child label.
>
>Any suggestions for a reusable function to do this?
>
Hi Malcolm,
I'm not sure about this idea, but I'm trying <bg>
Create a method in the parent container called SetProp (or whatever you like :) :
LParameters tc_Properties, t_Value, tc_Class
Local lc_Properties
If PEMStatus( This, tc_Properties, 5 )
lc_Properties = 'This.' + tc_Properties
&lc_Properties = t_Value
This.SetAll( tc_Properties, t_Value, tc_Class )
endif
Then you can call the method with:
ThisForm.oCntParent.SetProp( 'FontName', 'Arial', 'Label' )
ThisForm.oCntParent.SetProp( 'FontSize', 12, 'Label' )
Regards
Herman