SteveDingle
Programmer
Heya All,
I finished typing the following question, and then had a thought, and found solution. Figured I would share in case anyone else ran into it. Solution is to put initial resize code in the oleControl INIT not the container.
** Orignal Message **
VFP 9 SP1
I have an activeX control in a container( doesn't matter which one). Basically using the container as wrapper for control.
I want the oleControl to be the same size as the container. So I put the following in the INIT of the container
this.olecontrol.height = this.height
Also set the Anchor property of both the olecontrol and the container to 15 ( as I want them both to resize with form)
To test I dropped container on form, increased size of the container and then ran form, oleControl stayed the same size. I checked to see what was happening using ...
DEBUGOUT this.olecontrol.height
... and the control was changing size. It was somehow being set to its original dimensions sometime prior to the form init finishing. I found that by changing the Anchor property to 0, the initial resize worked but of course other resising didn't. Tried turning Anchor on/off in various places. Didn't help.
Toodles,
Steve Dingle
D&S Business Solutions Ltd
I finished typing the following question, and then had a thought, and found solution. Figured I would share in case anyone else ran into it. Solution is to put initial resize code in the oleControl INIT not the container.
** Orignal Message **
VFP 9 SP1
I have an activeX control in a container( doesn't matter which one). Basically using the container as wrapper for control.
I want the oleControl to be the same size as the container. So I put the following in the INIT of the container
this.olecontrol.height = this.height
Also set the Anchor property of both the olecontrol and the container to 15 ( as I want them both to resize with form)
To test I dropped container on form, increased size of the container and then ran form, oleControl stayed the same size. I checked to see what was happening using ...
DEBUGOUT this.olecontrol.height
... and the control was changing size. It was somehow being set to its original dimensions sometime prior to the form init finishing. I found that by changing the Anchor property to 0, the initial resize worked but of course other resising didn't. Tried turning Anchor on/off in various places. Didn't help.
Toodles,
Steve Dingle
D&S Business Solutions Ltd