>Thanks Cetain,
>I llike your idea, but It is different of what I thought because it is a lot of work.
>I don't only want to do that for combobox. I would like to do it for textbox, editbox, check, etc...
>My idea was duplicate all properties. At desingtime, the developer only has to set the properties of one object, and at runtime, when the container is started up, we get the two objects (exactly the same but controlsource property). In the refres method of the container is choosed wich one is visible.
>You probably think "Why don't make only one object and change the controlsource property in the refres of the container?"
>I have done it, but it does not work perfect (only in combobox).In case that the first controlsource is a field of a table, and that table has set a filter which select 0 records, and the combobox enabled property si set to .F.. If you change the controlsource property to a variable and the combobox enabled property to .T., you still get like the combobox enabled property was .F. because you can't change the value. Rare but real like the live.
>Thanks
Jose,
If at designtime developer only plays one object's properties and want it to be cloned why not also do it there ? Since you're in designtime you can use cloneobject after setting properties. I sometimes use it when I'll have ie: many checkboxes and don't want to make a class.
lparameters tnCopies
aselobj(aObj)
aselobj(aObjContainer,1)
for ix=1 to tnCopies
aObj[1].cloneobject(aObj[1].name+padl(ix,2,"0"))
with eval("aObjContainer[1]."+aObj[1].name+padl(ix,2,"0"))
.top = aObj[1].top + (aObj[1].height + 2) * ix
.left = aObj[1].left
endwith
endfor
aObjContainer[1].refresh
Also I'm not sure what you need is a builder or making that control another class.
Cetin