
Search is based on keyword.
Ex: "Procedures"
Do not search with natural language
Ex: "How do I write a new procedure?"
Q100098: Creating your own custom tab in the UI
SUMMARY
This article demonstrates how you can create your own custom type of tab and access it from Katana's main Tabs menu.
MORE INFORMATION
from Katana import QtCore, QtGui, UI4
class MyCustomTab(UI4.Tabs.BaseTab):
def __init__(self, parent):
UI4.Tabs.BaseTab.__init__(self, parent)
label = QtGui.QLabel('This is MyCustomTab')
label.setObjectName('label')
label.setStyleSheet('font-weight: bold; '
'font-size: 18pt; '
'font-style: italic;')
hLayout = QtGui.QHBoxLayout()
hLayout.setObjectName('hLayout')
hLayout.addStretch()
hLayout.addWidget(label)
hLayout.addStretch()
vLayout = QtGui.QVBoxLayout()
vLayout.setObjectName('vLayout')
vLayout.addLayout(hLayout)
self.setLayout(vLayout)
PluginRegistry = [
('KatanaPanel', 2.0, 'MyCustomTab', MyCustomTab),
('KatanaPanel', 2.0, 'Custom/MyCustomTab', MyCustomTab),
]
In order to see the tab type in the UI, save the Python code into a .py file and place this inside of a Tabs subfolder of a directory whose path is added to the $KATANA_RESOURCES environment variable.
The titles of separators can be customized by placing a file named separatorTitle.txt in a Tabs folder within a KATANA_RESOURCES directory. The first line of text from those files is used as a separator title:

Sorry you didn't find this helpful
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
If you can't find what you're looking for or you have a workflow question, please try Foundry Support.
If you have any thoughts on how we can improve our learning content, please email the Documentation team using the button below.
Thanks for taking time to give us feedback.