Closed GoogleCodeExporter closed 9 years ago
And exactly here is my FIX :
procedure TForm1.ChromeTabsActiveTabChanging(Sender: TObject; AOldTab,
ANewTab: TChromeTab; var Allow: Boolean);
begin
// check if there's an "old tab" and if so, check also if we have its
// index in the range of our collection; if so, then hide the browser
if Assigned(AOldTab) and (AOldTab.Index < FBrowsers.Count) then
FBrowsers[AOldTab.Index].Visible := False;
// and show the activated tab browser
If((ChromeTabs.Tabs.Count<>1)) Then
Begin
If((ANewTab.Index=(ChromeTabs.Tabs.Count-1)) AND Tab_Closed=True) Then
FBrowsers[AOldTab.Index].Visible := True
Else
FBrowsers[ANewTab.Index].Visible := True;
End
Else FBrowsers[ANewTab.Index].Visible := True;
//Now Tab is not closed
Tab_Closed:=False;
end;
procedure TForm1.ChromeTabsButtonCloseTabClick(Sender: TObject;
ATab: TChromeTab; var Close: Boolean);
begin
// delete the browser instance from the collection; since we've
// assigned True to the OwnsObjects property of the collection,
// we don't need to care of freeing the browser instance
FBrowsers.Delete(ATab.Index);
Tab_Closed:=True;
// allow the tab to close
Close := True;
end;
The point is that, what on CloseTab EVENT we checking, that is closing the
last_one-1 tab or not, and checking was a CloseTab EVENT executed before.
Exactly the problem is that, what Changing Procedure Starts Before Closing
Procedure.
---
REGARDS, Tugalov Abdurahman(nikname Priler).
Original comment by WEB2rb...@gmail.com
on 19 Jul 2013 at 10:04
I can't use your demo code as I don't have TChromium installed.
If I run the standard TChromeTabs demo then close the first tab everything
works as expected. Can you provide an example that uses the standard demo
without TChromium?
Original comment by paul.tho...@easy-ip.net
on 20 Jun 2014 at 8:07
Unable to reproduce. Please re-open if you can provide more details.
Original comment by paul.tho...@easy-ip.net
on 3 Sep 2014 at 7:40
Original issue reported on code.google.com by
WEB2rb...@gmail.com
on 19 Jul 2013 at 9:22