Hello everyone!
I have created a tab manager and I want to get a callback when the tab is switched. What should I do? Here’s my initial code:
TSharedRef<FWorkspaceItem> RootMenuGroup = FWorkspaceItem::NewGroup(LOCTEXT("CategoryOptionRootName", "Root"));
FilegroupMenuGroup = RootMenuGroup->AddGroup(LOCTEXT("CategoryOptionFileGroupName", "File Group Tabs"));
{
TSharedRef<SDockTab> DockTab =
SNew(SDockTab)
.TabRole(ETabRole::MajorTab)
.Label(LOCTEXT("CategoryOptionRootTab", "Main Tab"));
TabManager = FGlobalTabmanager::Get()->NewTabManager(DockTab);
TabManager->SetCanDoDragOperation(false);
}
EditorTabStack = FTabManager::NewStack();
EditorTabStack ->AddTab(CategoryOptionMainTabId1, ETabState::OpenedTab);
EditorTabStack ->AddTab(CategoryOptionMainTabId2, ETabState::OpenedTab);
EditorTabStack ->AddTab(CategoryOptionMainTabId3, ETabState::OpenedTab);
and all my tabs are dynamically. Anyone can help me. Thanks in advance.