Rewrite of Tabbedpane
As promised, a much cleaner version of
TabbedPane, makes sense. One may add components directly without creating a form. When a component is added directly, the Tabbedpane can resize and position the component appropriately.
TabbedPane does not create a Pad-based form like it earlier did by default. If we wish to place multiple components in a
TabbedPane we need to call
TabbedPane.form(tab) passing the tab.
Pressing a down arrow on the buttons above, takes focus to the tab below. Also, there is the option of displaying the tab as we traverse through the buttons. This mimics MicroEmacs behavior in User Setup. Otherwise by default, tabbedpanes behave like Terminal’s Preference Pane (in OSX) – we have to press a button, or use hotkey for tab to be displayed.
I still have to work on handling more buttons that can be seen on the tabbedpane component, much like Firefox.
Syntax for adding a tab is now:
tab1 = tp.add_tab “&TextView”, textview
The above requires textview to be created before the call. ALternatively, one can add the component later.
tab1 = tp.add_tab “&TextView”
# create textview here
tab1.component = textview