CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

AccordionTab->ComponentCount has wrong value

by JMiller » 25 Jul 2014 11:13

Hello!

I have an AccordionTab with another Accordion inside it, but when I check AccordionTab->ComponentCount is 0.
In another small project I checked the AccordionTab->ComponentCount, too. No matter what or how many components I put in there - it always has the value 1.

Can you confirm this?


Best regards,
Joe
JMiller
 
Posts: 135
Joined: 13 Jul 2012 05:01

by Jorge Sousa » 25 Jul 2014 11:23

Hi

Yes, we confirm this, and this is normal and alright.

The owner of any component will be the form or the frame, so only Form.ComponentCount or Frame.ComponentCount will change if you add/remove components.

What you're looking for is AccordionTab->ControlCount, not AccordionTab->ComponentCount
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by JMiller » 25 Jul 2014 12:32

Thanks for the clarification.

So I should access these things via
AccordionTab->Controls[0]
instead of
AccordionTab->Components[0]
?

The later worked fine so far.
JMiller
 
Posts: 135
Joined: 13 Jul 2012 05:01

by Jorge Sousa » 25 Jul 2014 14:13

Hi

So I should access these things via
AccordionTab->Controls[0]
instead of
AccordionTab->Components[0]


Exactly, by the parent chain and not by ownership chain.

The later worked fine so far.


only if the applyed to a form or frame, since they are the owners.

All of this is true for any control in Delphi, including Windows controls, DevExpress PageControl per instance.

if you create controls at runtime and pass other owners than the form/frame, that is another history.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQAccordion

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.