eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TabView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: TabView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--NoteBookView
                  |
                  +--TabView

Package:
stx:libwidg2
Category:
Views-Interactors
Version:
rev: 1.49 date: 2019/05/02 10:26:09
user: ca
file: TabView.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Atzkern

Description:


implements the tabs-view component of a noteBook.
May also be used on its own (without a surrounding noteBook).

The functionality is basically the same as provided by a
PopUpList or SelectionInListView, in that a valueHolder
gets a value assigned corresponding to the selected tab
from a list of possible tabs.


Related information:

    NoteBookView
    SelectionInListView
    PopUpList
    ValueHolder
    TabWidget

Instance protocol:

accessing
o  recomputeListHorizontal
compute layouts for all tabs

initialization
o  initStyle
setup style attributes


Examples:


tabs at top of a view
|top tab|

top := StandardSystemView new label:'tabs at bottom'; extent:250@100.
tab := TabView origin:(0.0 @ 0.0) corner:(1.0 @ 0.0)in:top.
tab direction:#top.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:anIndex| Transcript showCR:anIndex ].
tab bottomInset:(tab preferredExtent y negated).
top open.
tabs at bottom a view
|top tab|

top := StandardSystemView new label:'tabs at bottom'; extent:250@100.
tab := TabView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0)in:top.
tab direction:#bottom.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:anIndex| Transcript showCR:anIndex ].
tab topInset:(tab preferredExtent y negated).
top open.
tabs at right of a view
|top tab|

top := StandardSystemView new label:'tabs at right'; extent:100@250.
tab := TabView origin:1.0 @ 0.0 corner:1.0 @ 1.0 in:top.

tab direction:#right.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:aName|Transcript showCR:aName].
tab leftInset:(tab preferredExtent x negated).
top open.
tabs at left of a view
|top tab view inset|

top := StandardSystemView new label:'tabs at left'; extent:100@250.
tab := TabView origin:0.0 @ 0.0 corner:0.0 @ 1.0 in:top.

tab direction:#left.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:aName|Transcript showCR:aName].
tab rightInset:(tab preferredExtent x negated).
top open.
using icons and text
|top tab view list|

top := StandardSystemView new label:'using icons, text, ..'; extent:300@100.
tab := TabView origin:0.0 @ 0.0 corner:1.0 @ 0.0 in:top.
list := OrderedCollection new.
list add:( LabelAndIcon icon:(ToolbarIconLibrary workspace24x24Icon2) string:'Workspace' ).
list add:( ToolbarIconLibrary workspace24x24Icon2 ).
list add:( 'Workspace' ).
list add:( 'Workspace' allBold ).

tab list:list.
tab hasScrollButtons:true.
tab action:[:indexOrNil| Transcript showCR:indexOrNil ].
tab bottomInset:(tab preferredExtent y negated).
top open.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 23 Apr 2024 19:14:56 GMT