The TabView is a View subclass which represents Cocoa’s NSTabView. The way it works is that you add tab items to it with TabView.addTab(), which will return a TabViewItem. This tab item has a TabViewItem.view attribute that you can use as a parent for the subviews you want to add with that tab. Of course, like with any subview, the layout process in tab views are made independently of the layout in the tab view’s parent. Example:
tabview = TabView(mywindow) tab = tabview.addTab("mytab") label = Label(mytab.view, "label in my tab") tabview.moveTo(Pack.UpperLeft) tabview.fill(Pack.Right) tabview.fill(Pack.Below) tabview.setAnchor(Pack.UpperLeft, growX=True, growY=True) label.moveTo(Pack.UpperLeft) label.fill(Pack.Right)
|Parameters:||parent – A View instance. Same as View.parent.|
Cocoa constant. Determines where the tabs, if any, are located. Use with NSTabViewType constants.
String. The label of the tab item. Equivalent to [self label].
String. The identifier of the tab item. Equivalent to [self identifier].