CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

tabs close icon does not work ?

by amirreza_asadpour » 03 Apr 2016 20:28

hello sir . i set itab.closeicon;=true , but it does not work , also the close icon in demo version dose not work. please help me .
thank you very much
amirreza_asadpour
 
Posts: 6
Joined: 29 Sep 2015 22:10

by Alexander Bulei » 04 Apr 2016 14:29

Hi amirreza_asadpour,

You need implement the TabClose event and close by yourself.
We have removed the automatic remove, to provide the possibility to avoid closing.

delphi code
procedure TIWForm10.IWCGJQTabs1JQTabOptionsTabClose(Sender: TObject; AParams: TStringList);
var
Index: Integer;
Tab: TIWCGJQTab;
begin
if TryStrToInt(AParams.Values['$Arg_Index'], Index) then
begin
Tab:= IWCGJQTabs1.Tabs[Index];
IWCGJQTabs1.DeleteTab(Tab);
end;
end;


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 amirreza_asadpour » 04 Apr 2016 19:29

Hi Alexander Bulei . thank you a lot for your answer but It dose not work again :(

what should i do ? i used another button to close the selected tab and it work but the X is not working .
please help me .

can you send me a sample project ?
amirreza_asadpour
 
Posts: 6
Joined: 29 Sep 2015 22:10

by Alexander Bulei » 05 Apr 2016 09:12

Hi amirreza_asadpour,

It works as expected here.
Please make the simple testcase project to detect your problem.

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 assapan » 05 Apr 2016 19:28

Hi AjaxRender is missing

Code: Select all
procedure TIWForm4.IWCGJQTabs1JQTabOptionsTabClose(Sender: TObject;
  AParams: TStringList);
var
  Index: Integer;
  Tab: TIWCGJQTab;
begin
  if TryStrToInt(AParams.Values['$Arg_Index'], Index) then
  begin
    Tab:= IWCGJQTabs1.Tabs[Index];
    IWCGJQTabs1.DeleteTab(Tab);
    IWCGJQTabs1.AjaxReRender();
  end;
end;
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 06 Apr 2016 09:24

Hi,

I checked better this case, and you don't need have the code OnTabClose event.
Just assign the event....

The component have internal code to remove the tab when event is assigned.
And if you want prevent the closing, just raise the exception.

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 JQTabs

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.