CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Delete Tabs at Runtime

by bryl » 23 Mar 2017 17:29

Hello,
Can someone help me with instruction on deleting a Tab on the Accordion?
I have tried
Accordion.Tabs[0].Destroy
but it just deletes the button component on the tab.

Thanks in Advance!
bryl
 
Posts: 15
Joined: 23 Mar 2017 17:23

by Jorge Sousa » 23 Mar 2017 18:22

Hi

You shouldn't call .Destroy directly with any Delphi object.....

But .Free instead

that's what Tabs.DeleteTab does
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by bryl » 23 Mar 2017 18:59

Jorge,
Thank you for the response. I am running Cgdevtools version 2.9.0.284 and i do not see the function DeleteTabs. Was this added in a later version?
Bryan
bryl
 
Posts: 15
Joined: 23 Mar 2017 17:23

by Alexander Bulei » 23 Mar 2017 19:02

Hi bryl,

IWCGJQTabs1.DeleteTab(IWCGTab1);


DeleteTab is a public method...

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by bryl » 23 Mar 2017 19:37

Alexander,
I really appreciate the help. I am working with the Accordion not the Tab component.
I do not see a way to delete a Tab off the Accordion.

iwcgjqACCORDIONtab.deletetab() does not exist in version Version: 2.9.0.284

can you advise?
bryl
 
Posts: 15
Joined: 23 Mar 2017 17:23

by Alexander Bulei » 24 Mar 2017 10:49

Hello,

use the simple Free:

delphi code
IWCGJQAccordion1.Tabs[0].Free;


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by bryl » 24 Mar 2017 16:03

Accordion.Tabs[0].free does not work.
It deletes the components on the tab but does not delete the Accordion Tab itself.

Can you provide a simple tested section of code that adds a new tab at run time and deletes it?

Thanks
bryl
 
Posts: 15
Joined: 23 Mar 2017 17:23

by Alexander Bulei » 24 Mar 2017 16:05

Hi,

After removing the tab, use AjaxReRender method.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQAccordion

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.