>>BTW, unrelated small question: I have a container based phone control. I set a property lNoExtension, and if this property is set to true I want to remove txtExtension and its label. I wrote it using RemoveObject, but I'm thinking, it would be better to return .f. from the Init of these controls instead. What do you think? Or it's such a minor thing I should not even put my mind into...
>
>Hi Nadya,
>For this last every way is different.
>You have 3 ways:
>
>* 1. add it like a static member and
>* on txtExtension and label Init
>- RETURN !this.Parent.lNoExtension
>
>* 2. RemoveObject dynamically
>* on txtExtension and label Init
>
>* after you can show or RemoveObjects()
> Container.RemoveObject('txtExtension')
> Container.RemoveObject('Label')
>
>* 3. add it dynamically
> Container.AddObject('txtExtension'
> Container.AddObject('Label'
>
>
>I thinks Init .F. is faster,
>but, if % of Init false is > XX% ),
>add, with AddObject,
>the txtExtension is more faster in Average.
>
>The fundamental is not speed, but at design level.
>The difference 1. to 2. is a design difference:
>with 1. you remove the Extension definitively
>with 2. or 3. you can remove/add the Extension
>with a interactive choice ( by the customer for example ).
>
>Fabio
Thanks, Fabio. I think, I'll re-code with .f. in Init. That's really a simple Data Entry type of control and it we don't want to show extension, we would not change it in form's life time.
If it's not broken, fix it until it is.
My Blog