diff --git a/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.fmx b/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.fmx index 0e45e650..e2b2483f 100644 --- a/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.fmx +++ b/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.fmx @@ -48,6 +48,42 @@ object MainForm: TMainForm Size.PlatformDefault = False StyleLookup = 'deleteitembutton' end + object PrevTabBtn: TSpeedButton + Action = PrevTabAction + Align = Top + Enabled = True + ImageIndex = -1 + Position.X = 5.000000000000000000 + Position.Y = 54.000000000000000000 + Size.Width = 22.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + StyleLookup = 'arrowlefttoolbutton' + end + object NextTabBtn: TSpeedButton + Action = NextTabAction + Align = Top + Enabled = True + ImageIndex = -1 + Position.X = 5.000000000000000000 + Position.Y = 76.000000000000000000 + Size.Width = 22.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + StyleLookup = 'arrowrighttoolbutton' + end + object ShowTabsBtn: TSpeedButton + Action = ShowTabsAction + Align = Top + Enabled = True + ImageIndex = -1 + Position.X = 5.000000000000000000 + Position.Y = 98.000000000000000000 + Size.Width = 22.000000000000000000 + Size.Height = 22.000000000000000000 + Size.PlatformDefault = False + StyleLookup = 'passwordeditbutton' + end end object BrowserTabCtrl: TTabControl Align = Client @@ -69,5 +105,17 @@ object MainForm: TMainForm Text = 'RemoveTabAction' OnExecute = RemoveTabActionExecute end + object PrevTabAction: TAction + Text = 'PrevTabAction' + OnExecute = PrevTabActionExecute + end + object NextTabAction: TAction + Text = 'NextTabAction' + OnExecute = NextTabActionExecute + end + object ShowTabsAction: TAction + Text = 'ShowTabsAction' + OnExecute = ShowTabsActionExecute + end end end diff --git a/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.pas b/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.pas index 8f496dea..34c01d07 100644 --- a/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.pas +++ b/demos/Delphi_FMX_Windows/FMXTabbedBrowser/uMainForm.pas @@ -69,6 +69,12 @@ type ActionList1: TActionList; AddTabAction: TAction; RemoveTabAction: TAction; + PrevTabBtn: TSpeedButton; + PrevTabAction: TAction; + NextTabAction: TAction; + NextTabBtn: TSpeedButton; + ShowTabsBtn: TSpeedButton; + ShowTabsAction: TAction; procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); @@ -78,6 +84,9 @@ type procedure AddTabActionExecute(Sender: TObject); procedure RemoveTabActionExecute(Sender: TObject); procedure BrowserTabCtrlChange(Sender: TObject); + procedure PrevTabActionExecute(Sender: TObject); + procedure NextTabActionExecute(Sender: TObject); + procedure ShowTabsActionExecute(Sender: TObject); protected // Variables to control when can we destroy the form safely @@ -174,6 +183,18 @@ begin GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized; end; +procedure TMainForm.NextTabActionExecute(Sender: TObject); +begin + if (BrowserTabCtrl.TabIndex < pred(BrowserTabCtrl.TabCount)) then + BrowserTabCtrl.TabIndex := BrowserTabCtrl.TabIndex + 1; +end; + +procedure TMainForm.PrevTabActionExecute(Sender: TObject); +begin + if (BrowserTabCtrl.TabIndex > 0) then + BrowserTabCtrl.TabIndex := BrowserTabCtrl.TabIndex - 1; +end; + procedure TMainForm.NotifyMoveOrResizeStarted; var i : integer; @@ -261,6 +282,14 @@ begin TBrowserTab(BrowserTabCtrl.ActiveTab).ShowBrowser; end; +procedure TMainForm.ShowTabsActionExecute(Sender: TObject); +begin + if (BrowserTabCtrl.TabPosition = TTabPosition.PlatformDefault) then + BrowserTabCtrl.TabPosition := TTabPosition.None + else + BrowserTabCtrl.TabPosition := TTabPosition.PlatformDefault; +end; + procedure TMainForm.AddTabActionExecute(Sender: TObject); var TempNewTab : TBrowserTab; diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 358290bf..d0b06e9f 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,7 +2,7 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 248, + "InternalVersion" : 249, "Name" : "cef4delphi_lazarus.lpk", "Version" : "88.2.1.0" }