eveCalypso
Programmer
Hello All,
I hope you can help me!
I am building a form on the fly with many checkbox options from an array.
Everything works except...
being on the fly, I need to resize my form and frame as needed when I am done, to do this I need the width of the longest chexkbox in the current group.
I assumed that doing myNewCtrl.Autosize would resize the control to the correct caption width, but alas...
when I display the width of the checkbox directly afterwards, it displays (in my case) 57 for all of them (never enough!). If I comment the Autosize line out,
it at least stays with the default create dimension width of 108.
I could conceivably keep track of the longest caption myself and multiply the result by some factor, but that is not the preffered way! I can not guarentee that result.
Does anyone know why Autosize is not taking "effect"? I create the control as visible. Also, I start of with a maximum sized form and frame... do I need to repaint/refresh anything?
I am using VBA for Office 2000 (in Word).
ANY help would be appreciated!
Best Regards,
EvE
I hope you can help me!
I am building a form on the fly with many checkbox options from an array.
Everything works except...
being on the fly, I need to resize my form and frame as needed when I am done, to do this I need the width of the longest chexkbox in the current group.
I assumed that doing myNewCtrl.Autosize would resize the control to the correct caption width, but alas...
when I display the width of the checkbox directly afterwards, it displays (in my case) 57 for all of them (never enough!). If I comment the Autosize line out,
it at least stays with the default create dimension width of 108.
I could conceivably keep track of the longest caption myself and multiply the result by some factor, but that is not the preffered way! I can not guarentee that result.
Does anyone know why Autosize is not taking "effect"? I create the control as visible. Also, I start of with a maximum sized form and frame... do I need to repaint/refresh anything?
I am using VBA for Office 2000 (in Word).
ANY help would be appreciated!
Best Regards,
EvE