ComponentCount-1 downto 0
and versions that run from
ControlCount-1 downto 0
What is the difference (if any) between these two loops. Which would be most
appropriate for the above situation?
TIA,
Tom.
--
Tom MacAdam (lmsv...@linden.msvu.ca)
> What is the difference (if any) between these two loops. Which would be most
> appropriate for the above situation?
>
It's easy to understand :
ComponentCount -> All the components on the form and that you can find
on your component's toolbar.
ControlCount -> Component + other controls like another form created by
the parent.
Yvon HUBERT.
"Silence Has No Mean"
->The ControlCount property indicates the number of controls that are
CHILDREN of the windowed control.
The control is the PARENT of those controls.
->ComponentCount indicates the number of components OWNED by the component
as listed in the Components array property list.
The Control is the OWNER of those controls.
Example: - if you want to cycle trough all components in a form, even if
they are in a tab control, you should use
ComponentCount.
- if you want to cycle trough all components directly in a form, you
should use ControlCount.
Hope this help!!!
--
Martin Massé
ObjectLab Enr.
martin...@videotron.ca
>What is the difference (if any) between these two
The D1 helpfile seems to clear it up real nice....
<quote on>
Don't confuse the Controls property with the Components property. The
Components property lists all components that are owned by the
component, while the Controls property lists all the controls that are
child windows of the control.
All components put on a form are owned by the form, and therefore,
they appear in the form's Components property list.
For example, if you put a control in a group box, the form still owns
the control, but the control's window parent is the group box control,
and therefore, is listed in the group box's Controls property array.
<quote off>
So, if you are resizing from the FORM, I think you would use the
Components and ComponentCount properties.
Chuck Gadd
Director of Software Development, Cyber FX Communications.
e-mail:cgadd-...@cyber-fx.com http://www.csd.net/~cgadd
Remove the -NOSPAM from my email address to send me e-mail.
*** I boycott businesses that send me unsolicited email advertisements ***